From 2bdcc043ca17995c6af34c868b93915c550da711 Mon Sep 17 00:00:00 2001 From: Yuan Si Date: Thu, 30 Mar 2023 00:30:09 +0800 Subject: [PATCH] Hardcode userId Unfortunately the official server is near to close, we don't have time to pull user data from it. Signed-off-by: Yuan Si --- handler/login.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/handler/login.go b/handler/login.go index 40f9944..651bf0b 100644 --- a/handler/login.go +++ b/handler/login.go @@ -132,11 +132,12 @@ func LoginHandler(ctx *gin.Context) { } nonce++ - userId, err := database.GetUid(string(keyDescrypted)) - if err != nil { - ctx.String(http.StatusForbidden, "Fuck you!") - return - } + // userId, err := database.GetUid(string(keyDescrypted)) + // if err != nil { + // ctx.String(http.StatusForbidden, "Fuck you!") + // return + // } + userId := 9999999 authorizeToken := utils.RandomBase64Token(32) _, err = database.RedisCli.HSet(database.RedisCtx, "token_uid", authorizeToken, userId).Result()