Boost Azure Demo
This commit is contained in:
16
Backend/internal/handlers/api/answers/routes.go
Normal file
16
Backend/internal/handlers/api/answers/routes.go
Normal file
@@ -0,0 +1,16 @@
|
||||
// Path: Backend/internal/handlers/api/answers/routes.go
|
||||
|
||||
package answers
|
||||
|
||||
import (
|
||||
authmw "boostai-backend/internal/middleware"
|
||||
|
||||
"github.com/gofiber/fiber/v2"
|
||||
)
|
||||
|
||||
func RegisterRoutes(app fiber.Router, auth *authmw.AuthMiddleware, h *Handler) {
|
||||
app.Get("/assignments/:assignmentId/answers", auth.RequireTeacher(), h.ListAnswersForAssignment)
|
||||
app.Get("/students/:studentId/answers", auth.RequireStudentSelfOrTeacher("studentId"), h.ListAnswersForStudent)
|
||||
app.Post("/answers", h.UpsertStudentAnswer)
|
||||
app.Patch("/answers/:answerId/review", auth.RequireTeacher(), h.UpdateAnswerReview)
|
||||
}
|
||||
Reference in New Issue
Block a user