style: remove unnecessary /quiz prefix 4 miniPart\nci:add envs for encription
This commit is contained in:
parent
192d3e76af
commit
2b912dd2f2
@ -16,6 +16,9 @@ services:
|
|||||||
PG_CRED: 'host=10.8.0.5 port=5433 user=squiz password=Redalert2 dbname=squiz sslmode=disable'
|
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_HOST: '10.8.0.5:6379'
|
||||||
REDIS_PASSWORD: 'Redalert2'
|
REDIS_PASSWORD: 'Redalert2'
|
||||||
REDIS_DB: 2
|
REDIS_DB: 2
|
||||||
|
PUBLIC_KEY: $PUBLIC_KEY
|
||||||
|
PRIVATE_KEY: $PRIVATE_KEY
|
||||||
|
|
||||||
ports:
|
ports:
|
||||||
- 10.8.0.5:1491:1490
|
- 10.8.0.5:1491:1490
|
||||||
|
@ -58,7 +58,7 @@ func New(deps ServiceDeps) *Service {
|
|||||||
func (s *Service) Register(app *fiber.App) *fiber.App {
|
func (s *Service) Register(app *fiber.App) *fiber.App {
|
||||||
app.Post("/answer", s.PutAnswersOnePiece)
|
app.Post("/answer", s.PutAnswersOnePiece)
|
||||||
app.Post("/settings", s.GetQuizData)
|
app.Post("/settings", s.GetQuizData)
|
||||||
app.Get("/quiz/logo", s.MiniPart)
|
app.Get("/logo", s.MiniPart)
|
||||||
return app
|
return app
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -150,7 +150,6 @@ func (s *Service) GetQuizData(c *fiber.Ctx) error {
|
|||||||
|
|
||||||
showBadge := true
|
showBadge := true
|
||||||
|
|
||||||
fmt.Println("PRIVRRRR", account.ID, account.Privileges)
|
|
||||||
if priv, ok := account.Privileges["squizHideBadge"]; ok {
|
if priv, ok := account.Privileges["squizHideBadge"]; ok {
|
||||||
expiration := priv.CreatedAt.Add(time.Duration(priv.Amount) * 24 * time.Hour)
|
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())
|
return ctx.Status(fiber.StatusInternalServerError).SendString(err.Error())
|
||||||
}
|
}
|
||||||
|
|
||||||
fmt.Println("OLOLO", string(shifr))
|
|
||||||
|
|
||||||
ctx.Cookie(&fiber.Cookie{
|
ctx.Cookie(&fiber.Cookie{
|
||||||
Name: "quizUser",
|
Name: "quizUser",
|
||||||
Value: url.QueryEscape(string(shifr)),
|
Value: url.QueryEscape(string(shifr)),
|
||||||
|
Loading…
Reference in New Issue
Block a user