added routes package and serve in server package
This commit is contained in:
1 parent
303b9344f8
commit
547949795f
8 files changed
+74
-77
No files matched your search
@@ -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)
|
||||
}
|
||||
@@ -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)
|
||||
}
|
||||
@@ -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)
|
||||
}
|
||||
Reference in new issue
Block a user