Skip to content

Commit

Permalink
exam_cr_sudo
Browse files Browse the repository at this point in the history
  • Loading branch information
golanguzb71 committed Oct 29, 2024
1 parent 118469b commit 6b6886f
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions api-gateway/internal/routes/ielts_service_routes.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,22 @@ func IeltsServiceRoutes(api *gin.RouterGroup, authClient *client.AuthClient) {
}
exam := ielts.Group("/exam")
{
exam.POST("/create", middleware.AuthMiddleware([]string{"USER"}, authClient), handlers.CreateExam)
exam.POST("/create", middleware.AuthMiddleware([]string{"USER", "ADMIN"}, authClient), handlers.CreateExam)
result := exam.Group("/result")
{
result.GET("/:page/:size", middleware.AuthMiddleware([]string{"USER"}, authClient), handlers.GetExamResult)
result.GET("/user-answers/:examId", middleware.AuthMiddleware([]string{"USER"}, authClient), handlers.GetExamUserAnswers)
result.GET("/:page/:size", middleware.AuthMiddleware([]string{"USER", "ADMIN"}, authClient), handlers.GetExamResult)
result.GET("/user-answers/:examId", middleware.AuthMiddleware([]string{"USER", "ADMIN"}, authClient), handlers.GetExamUserAnswers)
result.GET("/top-exam-result/:dataframe", handlers.GetTopExamResult)
result.GET("/get-results-inline/:sectionType/:examId", middleware.AuthMiddleware([]string{"USER"}, authClient), handlers.GetResultsInlineBySection)
result.GET("/get-results-outline-writing/:examId", middleware.AuthMiddleware([]string{"USER"}, authClient), handlers.GetResultsOutlineWriting)
result.GET("/get-results-outline-speaking/:examId/:partNumber", middleware.AuthMiddleware([]string{"USER"}, authClient), handlers.GetResultsOutlineSpeaking)
result.GET("/get-results-inline/:sectionType/:examId", middleware.AuthMiddleware([]string{"USER", "ADMIN"}, authClient), handlers.GetResultsInlineBySection)
result.GET("/get-results-outline-writing/:examId", middleware.AuthMiddleware([]string{"USER", "ADMIN"}, authClient), handlers.GetResultsOutlineWriting)
result.GET("/get-results-outline-speaking/:examId/:partNumber", middleware.AuthMiddleware([]string{"USER", "ADMIN"}, authClient), handlers.GetResultsOutlineSpeaking)
result.GET("/get-results-speaking-voice/:voiceName", handlers.GetVoiceRecord)
}
attempt := exam.Group("/attempt")
{
attempt.POST("/create/inline", middleware.AuthMiddleware([]string{"USER"}, authClient), handlers.CreateInlineAttempt)
attempt.POST("/create/outline-writing", middleware.AuthMiddleware([]string{"USER"}, authClient), handlers.CreateOutlineAttemptWriting)
attempt.POST("/create/outline-speaking/:examId", middleware.AuthMiddleware([]string{"USER"}, authClient), handlers.CreateOutlineAttemptSpeaking)
attempt.POST("/create/inline", middleware.AuthMiddleware([]string{"USER", "ADMIN"}, authClient), handlers.CreateInlineAttempt)
attempt.POST("/create/outline-writing", middleware.AuthMiddleware([]string{"USER", "ADMIN"}, authClient), handlers.CreateOutlineAttemptWriting)
attempt.POST("/create/outline-speaking/:examId", middleware.AuthMiddleware([]string{"USER", "ADMIN"}, authClient), handlers.CreateOutlineAttemptSpeaking)
}

}
Expand Down

0 comments on commit 6b6886f

Please sign in to comment.