feat: add API routes and endpoints
- Add authentication routes for login, logout, and token refresh - Add user management routes with proper authorization - Add session management routes for session operations - Add access control routes for API permissions - Add test routes for development and debugging - Include proper route grouping and middleware application - Implement RESTful API design patterns
This commit is contained in:
27
routes/api.go
Normal file
27
routes/api.go
Normal file
@@ -0,0 +1,27 @@
|
||||
package routes
|
||||
|
||||
import (
|
||||
"github.com/gofiber/fiber/v2"
|
||||
)
|
||||
|
||||
func SetupRoutes(app *fiber.App) {
|
||||
ApiRoutes(app)
|
||||
}
|
||||
|
||||
func ApiRoutes(app *fiber.App) {
|
||||
api := app.Group("/api")
|
||||
|
||||
// api.Use(cache.New(cache.Config{
|
||||
// Next: func(c *fiber.Ctx) bool {
|
||||
// return c.Query("noCache") == "true"
|
||||
// },
|
||||
// Expiration: 5 * time.Minute,
|
||||
// CacheControl: true,
|
||||
// }))
|
||||
|
||||
UserRoutes(api)
|
||||
TestRoutes(api)
|
||||
AuthRoutes(api)
|
||||
SessionRoutes(api)
|
||||
AccessRoutes(api)
|
||||
}
|
Reference in New Issue
Block a user