Update API
This commit is contained in:
@@ -1,20 +0,0 @@
|
||||
package api
|
||||
|
||||
import (
|
||||
"github.com/gofiber/fiber/v2"
|
||||
)
|
||||
|
||||
type Handler struct {
|
||||
// dependencies
|
||||
}
|
||||
|
||||
func NewHandler() *Handler {
|
||||
return &Handler{}
|
||||
}
|
||||
|
||||
func (h *Handler) HealthCheck(c *fiber.Ctx) error {
|
||||
return c.JSON(fiber.Map{
|
||||
"status": "success",
|
||||
"message": "Server is running",
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package api
|
||||
|
||||
import (
|
||||
"BE-MiniERP/modules/auth"
|
||||
"BE-MiniERP/modules/inventory"
|
||||
"BE-MiniERP/modules/sales"
|
||||
|
||||
"github.com/gofiber/fiber/v2"
|
||||
)
|
||||
|
||||
func SetupRoutes(app *fiber.App) {
|
||||
auth.RegisterRoutes(app.Group("/auth"))
|
||||
inventory.RegisterRoutes(app.Group("/inventory"))
|
||||
sales.RegisterRoutes(app.Group("/sales"))
|
||||
}
|
||||
Reference in New Issue
Block a user