Boost Azure Demo
This commit is contained in:
14
Backend/internal/handlers/api/classrooms/routes.go
Normal file
14
Backend/internal/handlers/api/classrooms/routes.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package classrooms
|
||||
|
||||
import (
|
||||
authmw "boostai-backend/internal/middleware"
|
||||
|
||||
"github.com/gofiber/fiber/v2"
|
||||
)
|
||||
|
||||
func RegisterRoutes(app fiber.Router, auth *authmw.AuthMiddleware, h *Handler) {
|
||||
app.Get("/teachers/:teacherId/classrooms", h.ListClassroomsByTeacher)
|
||||
app.Get("/classrooms/:classroomId/students", h.ListStudentsForClassroom)
|
||||
app.Post("/classrooms", auth.RequireTeacher(), h.CreateClassroom)
|
||||
app.Post("/classrooms/:classroomId/students", auth.RequireTeacher(), h.AddStudentToClassroom)
|
||||
}
|
||||
Reference in New Issue
Block a user