23 lines
665 B
Go
23 lines
665 B
Go
package quiz
|
|
|
|
import "github.com/gofiber/fiber/v2"
|
|
|
|
func (r *Quiz) Register(router fiber.Router) {
|
|
router.Post("/create", r.CreateQuiz)
|
|
router.Post("/getList", r.GetQuizList)
|
|
router.Patch("/edit", r.UpdateQuiz)
|
|
router.Post("/copy", r.CopyQuiz)
|
|
router.Post("/history", r.GetQuizHistory)
|
|
router.Delete("/delete", r.DeleteQuiz)
|
|
router.Patch("/archive", r.ArchiveQuiz)
|
|
router.Post("/move", r.QuizMove)
|
|
router.Post("/template", r.TemplateCopy)
|
|
router.Post("/:quizID/auditory", r.CreateQuizAuditory)
|
|
router.Get("/:quizID/auditory", r.GetQuizAuditory)
|
|
router.Delete("/:quizID/auditory", r.DeleteQuizAuditory)
|
|
}
|
|
|
|
func (r *Quiz) Name() string {
|
|
return "quiz"
|
|
}
|