diff --git a/go.mod b/go.mod index b5335a5..6b8c587 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ require ( gitea.pena/PenaSide/common v0.0.0-20250421103113-7e4b3ae9e1e0 gitea.pena/PenaSide/hlog v0.0.0-20241125221102-a54c29c002a9 gitea.pena/PenaSide/trashlog v0.0.0-20250224122049-ddb4d72e9d07 - gitea.pena/SQuiz/common v0.0.0-20250514101340-d27fa4798a14 + gitea.pena/SQuiz/common v0.0.0-20250514124515-870e52266ca5 gitea.pena/SQuiz/worker v0.0.0-20250410234138-cad6445b4e4f github.com/gofiber/fiber/v2 v2.52.6 github.com/golang-jwt/jwt/v5 v5.2.2 diff --git a/go.sum b/go.sum index 5edb3df..820043e 100644 --- a/go.sum +++ b/go.sum @@ -13,6 +13,8 @@ gitea.pena/SQuiz/common v0.0.0-20250510091827-dd71e1b6712d h1:8gx2IY1/OOx8jIAEYn gitea.pena/SQuiz/common v0.0.0-20250510091827-dd71e1b6712d/go.mod h1:/YR+uo4RouZshuHPkguk7nAJVKuFt3Z0mTFxUPdlzxQ= gitea.pena/SQuiz/common v0.0.0-20250514101340-d27fa4798a14 h1:2yOBm9dS7PQ458GBPbVdnbKovAP8SWFqa5rWfzzCj5w= gitea.pena/SQuiz/common v0.0.0-20250514101340-d27fa4798a14/go.mod h1:zCrUwDh0APpztKk6NUqTZv+zhjVbWpGBJiJ5z9dAH0U= +gitea.pena/SQuiz/common v0.0.0-20250514124515-870e52266ca5 h1:C+iCsGMSUJonOTNNk8wWYOfzZ0Jjw+2IQ5FaEGwRVT0= +gitea.pena/SQuiz/common v0.0.0-20250514124515-870e52266ca5/go.mod h1:zCrUwDh0APpztKk6NUqTZv+zhjVbWpGBJiJ5z9dAH0U= gitea.pena/SQuiz/worker v0.0.0-20250227130447-f32f55d7752e h1:+NbE0scdaXIy58XsK+8WKUNQeZiM3PPsQwBG92Tyncs= gitea.pena/SQuiz/worker v0.0.0-20250227130447-f32f55d7752e/go.mod h1:MDEYDHXF65HiWU/C43MKtX4sct9ktrczV4pzggVNsUc= gitea.pena/SQuiz/worker v0.0.0-20250410234138-cad6445b4e4f h1:MLftlXTvJEWdHew7H5MVjssK6u08xLedeOWApnUGoh8= diff --git a/service/question_svc.go b/service/question_svc.go index 0832772..db214f5 100644 --- a/service/question_svc.go +++ b/service/question_svc.go @@ -1,12 +1,12 @@ package service import ( - "github.com/gofiber/fiber/v2" - "github.com/lib/pq" "gitea.pena/PenaSide/common/log_mw" "gitea.pena/SQuiz/common/middleware" "gitea.pena/SQuiz/common/model" "gitea.pena/SQuiz/core/models" + "github.com/gofiber/fiber/v2" + "github.com/lib/pq" "unicode/utf8" ) @@ -75,7 +75,7 @@ func (s *Service) CreateQuestion(ctx *fiber.Ctx) error { hlogger.Emit(models.InfoQuestionCreate{ CtxUserID: accountID, - CtxIDInt: int64(req.QuizId), + CtxIDInt: int64(req.QuizId), CtxQuestionID: int64(questionID), }) @@ -136,6 +136,7 @@ func (s *Service) GetQuestionList(ctx *fiber.Ctx) error { req.Required, req.Search, req.Type, + 0, ) if err != nil { return ctx.Status(fiber.StatusInternalServerError).SendString(err.Error()) @@ -312,7 +313,7 @@ func (s *Service) DeleteQuestion(ctx *fiber.Ctx) error { hlogger.Emit(models.InfoQuestionDelete{ CtxUserID: accountID, - CtxIDInt: int64(deleted.QuizId), + CtxIDInt: int64(deleted.QuizId), CtxQuestionID: int64(deleted.Id), })