UPDATE: Project Module
All checks were successful
Build and Release / release (push) Successful in 1m15s

This commit is contained in:
2026-04-25 14:05:15 +07:00
parent 44a63f29c6
commit ac90236022
71 changed files with 5110 additions and 257 deletions

View File

@@ -0,0 +1,41 @@
package routes
import (
"history-api/internal/controllers"
"history-api/internal/middlewares"
"history-api/internal/repositories"
"github.com/gofiber/fiber/v3"
)
func ProjectRoutes(app *fiber.App, controller *controllers.ProjectController, userRepo repositories.UserRepository) {
route := app.Group("/projects")
route.Get(
"/:id",
controller.GetProjectByID,
)
route.Put(
"/:id",
middlewares.JwtAccess(userRepo),
controller.UpdateProject,
)
route.Delete(
"/:id",
middlewares.JwtAccess(userRepo),
controller.DeleteProject,
)
route.Get(
"/",
controller.SearchProject,
)
route.Post(
"/",
middlewares.JwtAccess(userRepo),
controller.CreateProject,
)
}