Spaces:
Runtime error
Runtime error
Commit ·
80e295f
1
Parent(s): 115e048
Deploy files from GitHub repository
Browse filesFiles changed (4)
22 unmodified lines2324252627282922 unmodified linesfunc (r *examEventAssignRepository) Check(ctx context.Context, eventId uuid.UUID, examId uuid.UUID) error {return r.db.WithContext(ctx).Where("event_id = ? AND exam_id = ?", eventId, examId).First(&entity.ExamEventAssign{}).Error}func (r *examEventAssignRepository) Create(ctx context.Context, m entity.ExamEventAssign) error {22 unmodified lines232425262728293022 unmodified linesfunc (r *examEventAssignRepository) Check(ctx context.Context, eventId uuid.UUID, examId uuid.UUID) error {return r.db.WithContext(ctx).Where("event_id = ?", eventId).Where("exam_id = ?", examId).First(&entity.ExamEventAssign{}).Error}func (r *examEventAssignRepository) Create(ctx context.Context, m entity.ExamEventAssign) error {
37 unmodified lines38394041424337 unmodified linesvar attempt entity.ExamEventAttempterr := r.db.WithContext(ctx).Preload("Answers").Where("event_id = ?", eventId).Where("exam_id = ?", examId).37 unmodified lines3839404142434437 unmodified linesvar attempt entity.ExamEventAttempterr := r.db.WithContext(ctx).Preload("Questions").Preload("Answers").Where("event_id = ?", eventId).Where("exam_id = ?", examId).
9 unmodified lines1011121314151617189 unmodified linesauth := middleware.ProvideAuthenticationMiddleware()routerGroup := router.Group("api/v1/events"){routerGroup.GET("/:event_slug/exam/", auth.VerifyAccount, examController.List)routerGroup.GET("/:event_slug/exam/:exam_slug/attempt", auth.VerifyAccount, examController.Attempt)routerGroup.POST("/:event_slug/exam/:attempt_id/answer_question/", auth.VerifyAccount, examController.Answer)routerGroup.POST("/:event_slug/exam/:attempt_id/submit/", auth.VerifyAccount, examController.Submit)}}9 unmodified lines1011121314151617189 unmodified linesauth := middleware.ProvideAuthenticationMiddleware()routerGroup := router.Group("api/v1/events"){routerGroup.GET("/:event_slug/exam", auth.VerifyAccount, examController.List)routerGroup.GET("/:event_slug/exam/:exam_slug/attempt", auth.VerifyAccount, examController.Attempt)routerGroup.POST("/:event_slug/exam/:attempt_id/answer_question", auth.VerifyAccount, examController.Answer)routerGroup.POST("/:event_slug/exam/:attempt_id/submit", auth.VerifyAccount, examController.Submit)}}
36 unmodified lines37383940414236 unmodified linesjwtService: jwtService,accountRepo: accountRepo,accountDetailRepo: accountDetailRepo,}}36 unmodified lines3738394041424336 unmodified linesjwtService: jwtService,accountRepo: accountRepo,accountDetailRepo: accountDetailRepo,}}
repositories/exam_event_assign_repository.go+2-1
repositories/exam_event_attempt_repository.go+1
router/exam_event_router.go+3-3
services/account_service.go+1