From 2b912dd2f2b8fe45db3c89dc543d284d3c66211b Mon Sep 17 00:00:00 2001 From: skeris Date: Sun, 2 Jun 2024 16:43:08 +0300 Subject: [PATCH] style: remove unnecessary /quiz prefix 4 miniPart\nci:add envs for encription --- deployments/staging/docker-compose.yaml | 5 ++++- service/service.go | 5 +---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/deployments/staging/docker-compose.yaml b/deployments/staging/docker-compose.yaml index f640aa2..5283aae 100644 --- a/deployments/staging/docker-compose.yaml +++ b/deployments/staging/docker-compose.yaml @@ -16,6 +16,9 @@ services: PG_CRED: 'host=10.8.0.5 port=5433 user=squiz password=Redalert2 dbname=squiz sslmode=disable' REDIS_HOST: '10.8.0.5:6379' REDIS_PASSWORD: 'Redalert2' - REDIS_DB: 2 + REDIS_DB: 2 + PUBLIC_KEY: $PUBLIC_KEY + PRIVATE_KEY: $PRIVATE_KEY + ports: - 10.8.0.5:1491:1490 diff --git a/service/service.go b/service/service.go index 157cf3f..e27e367 100644 --- a/service/service.go +++ b/service/service.go @@ -58,7 +58,7 @@ func New(deps ServiceDeps) *Service { func (s *Service) Register(app *fiber.App) *fiber.App { app.Post("/answer", s.PutAnswersOnePiece) app.Post("/settings", s.GetQuizData) - app.Get("/quiz/logo", s.MiniPart) + app.Get("/logo", s.MiniPart) return app } @@ -150,7 +150,6 @@ func (s *Service) GetQuizData(c *fiber.Ctx) error { showBadge := true - fmt.Println("PRIVRRRR", account.ID, account.Privileges) if priv, ok := account.Privileges["squizHideBadge"]; ok { expiration := priv.CreatedAt.Add(time.Duration(priv.Amount) * 24 * time.Hour) @@ -424,8 +423,6 @@ func (s *Service) MiniPart(ctx *fiber.Ctx) error { return ctx.Status(fiber.StatusInternalServerError).SendString(err.Error()) } - fmt.Println("OLOLO", string(shifr)) - ctx.Cookie(&fiber.Cookie{ Name: "quizUser", Value: url.QueryEscape(string(shifr)),