generated from PenaSide/GolangTemplate
change base docker images to own
This commit is contained in:
parent
064dbdc998
commit
2f7d785c82
@ -1,5 +1,5 @@
|
||||
# BUILD
|
||||
FROM golang:1.22.0-alpine AS build
|
||||
FROM penahub.gitlab.yandexcloud.net:5050/devops/dockerhub-backup/golang:main.3862 AS build
|
||||
|
||||
# Update packages and clear cache
|
||||
RUN apk add --no-cache curl
|
||||
@ -21,7 +21,7 @@ RUN go mod download
|
||||
RUN GOOS=linux go build -o bin ./...
|
||||
|
||||
# PRODUCTION
|
||||
FROM alpine:3.18.3 AS production
|
||||
FROM penahub.gitlab.yandexcloud.net:5050/devops/dockerhub-backup/alpine:main.3862 AS production
|
||||
|
||||
# Install packages
|
||||
RUN apk --no-cache add ca-certificates
|
||||
|
@ -2,7 +2,6 @@ package wallet_client
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"github.com/gofiber/fiber/v2"
|
||||
"go.uber.org/zap"
|
||||
"penahub.gitlab.yandexcloud.net/backend/penahub_common/log_mw"
|
||||
@ -307,18 +306,12 @@ func (receiver *WalletController) PostWalletRspay(ctx *fiber.Ctx) error {
|
||||
return receiver.middleWare.Error(ctx, fiber.StatusForbidden, "not allowed for non organizations")
|
||||
}
|
||||
token := ctx.Get("Authorization")
|
||||
fmt.Println("HEADERS", ctx.Request().Header)
|
||||
|
||||
verification, err := receiver.verifyClient.GetVerification(ctx.Context(), token, userID)
|
||||
if err == errors.ErrNotFound {
|
||||
return receiver.middleWare.Error(ctx, fiber.StatusForbidden, "no verification data found")
|
||||
}
|
||||
|
||||
if (user.Status == models.AccountStatusOrg && len(verification.Files) < 2) ||
|
||||
(user.Status == models.AccountStatusNko && len(verification.Files) < 3) {
|
||||
return receiver.middleWare.Error(ctx, fiber.StatusForbidden, "not enough verification files")
|
||||
}
|
||||
|
||||
authData, err := receiver.authClient.GetUser(ctx.Context(), userID)
|
||||
if err != nil {
|
||||
return receiver.middleWare.ErrorOld(ctx, err)
|
||||
|
Loading…
Reference in New Issue
Block a user