Update API

This commit is contained in:
2025-06-22 23:23:26 +07:00
parent b077ef9f06
commit 40705fbf3b
63 changed files with 1976 additions and 81 deletions
-20
View File
@@ -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",
})
}
+15
View File
@@ -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"))
}