add return id new quiz in tmpl copy
This commit is contained in:
parent
bcd4ba7bfa
commit
ccb8b37402
@ -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,
|
||||
|
2
go.mod
2
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
|
||||
)
|
||||
|
||||
|
2
go.sum
2
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=
|
||||
|
@ -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})
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user