added routes package and serve in server package
Build and Test / build-and-test-backend (push) Successful in 27s
Build and Test / build-and-test-frontend (push) Successful in 32s

This commit is contained in:
wt committed 2025-08-10 15:09:09 +07:00
1 parent 303b9344f8
commit 547949795f
8 files changed
+74 -77

No files matched your search

+13
View File
@@ -0,0 +1,13 @@
package routes
import (
"backend/api"
"github.com/gofiber/fiber/v2"
)
func CategoryRoutes(group fiber.Router) {
categoryGroup := group.Group("/category")
categoryGroup.Get("/", api.GetAllCategories)
categoryGroup.Post("/", api.CreateCategory)
}
+12
View File
@@ -0,0 +1,12 @@
package routes
import (
"backend/api"
"github.com/gofiber/fiber/v2"
)
func OperationRoutes(group fiber.Router) {
operationGroup := group.Group("/operation")
operationGroup.Get("/", api.GetAllOperation)
}
+13
View File
@@ -0,0 +1,13 @@
package routes
import (
"backend/api"
"github.com/gofiber/fiber/v2"
)
func UsersRoutes(group fiber.Router) {
usersGroup := group.Group("/users")
usersGroup.Get("/", api.GetAllUsers)
usersGroup.Get("/user", api.GetUserData)
}