diff --git a/app/app.go b/app/app.go index fbfc9ee..fe7f058 100644 --- a/app/app.go +++ b/app/app.go @@ -110,11 +110,6 @@ func New(ctx context.Context, opts interface{}, ver appInit.Version) (appInit.Co return nil, err } - if err := pgdal.Init(); err != nil { - fmt.Println("INIT", err) - return nil, err - } - kafkaClient, err := initialize.KafkaInit(ctx, initialize.KafkaDeps{ KafkaGroup: options.KafkaGroup, KafkaBrokers: options.KafkaBrokers, diff --git a/go.mod b/go.mod index fa494e5..dcddd9e 100644 --- a/go.mod +++ b/go.mod @@ -18,7 +18,7 @@ require ( google.golang.org/grpc v1.63.2 google.golang.org/protobuf v1.34.1 penahub.gitlab.yandexcloud.net/backend/penahub_common v0.0.0-20240223054633-6cb3d5ce45b6 - penahub.gitlab.yandexcloud.net/backend/quiz/common.git v0.0.0-20240513111030-284699448096 + penahub.gitlab.yandexcloud.net/backend/quiz/common.git v0.0.0-20240517141141-18672a757abc penahub.gitlab.yandexcloud.net/backend/quiz/worker.git v0.0.0-20240421230341-0e086fcbb990 ) diff --git a/go.sum b/go.sum index 53cd928..3337109 100644 --- a/go.sum +++ b/go.sum @@ -315,5 +315,7 @@ penahub.gitlab.yandexcloud.net/backend/penahub_common v0.0.0-20240223054633-6cb3 penahub.gitlab.yandexcloud.net/backend/penahub_common v0.0.0-20240223054633-6cb3d5ce45b6/go.mod h1:lTmpjry+8evVkXWbEC+WMOELcFkRD1lFMc7J09mOndM= penahub.gitlab.yandexcloud.net/backend/quiz/common.git v0.0.0-20240513111030-284699448096 h1:Ad9OvXNK9Yx3dH3TIle24pYilE+IoCgewZv7Yw9RP9M= penahub.gitlab.yandexcloud.net/backend/quiz/common.git v0.0.0-20240513111030-284699448096/go.mod h1:/DcyAjBh41IbomuDu5QzhL9flZW6lWO3ZAEbUXKobk0= +penahub.gitlab.yandexcloud.net/backend/quiz/common.git v0.0.0-20240517141141-18672a757abc h1:K2oxiU2xyibqqibkL77NQFCLfB3ZRLg7HxdTVPxIyOk= +penahub.gitlab.yandexcloud.net/backend/quiz/common.git v0.0.0-20240517141141-18672a757abc/go.mod h1:oRyhT55ctjqp/7ZxIzkR7OsQ7T/NLibsfrbb7Ytns64= penahub.gitlab.yandexcloud.net/backend/quiz/worker.git v0.0.0-20240421230341-0e086fcbb990 h1:jiO8GWO+3sCnDAV8/NAV8tQIUwae/I6/xiDilW7zf0o= penahub.gitlab.yandexcloud.net/backend/quiz/worker.git v0.0.0-20240421230341-0e086fcbb990/go.mod h1:zswBuTwmEsFHBVRu1nkG3/Fwylk5Vcm8OUm9iWxccSE= diff --git a/service/quiz_svc.go b/service/quiz_svc.go index 028798a..56a74b1 100644 --- a/service/quiz_svc.go +++ b/service/quiz_svc.go @@ -503,10 +503,10 @@ func (s *Service) TemplateCopy(ctx *fiber.Ctx) error { return ctx.Status(fiber.StatusBadRequest).SendString("Invalid request qid is required") } - err := s.dal.QuizRepo.TemplateCopy(ctx.Context(), accountID, req.Qid) + qizID, err := s.dal.QuizRepo.TemplateCopy(ctx.Context(), accountID, req.Qid) if err != nil { return ctx.Status(fiber.StatusInternalServerError).SendString(err.Error()) } - return ctx.SendStatus(fiber.StatusOK) + return ctx.Status(fiber.StatusOK).JSON(fiber.Map{"id": qizID}) }