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 <do4suki@gmail.com>
This commit is contained in:
+6
-5
@@ -132,11 +132,12 @@ func LoginHandler(ctx *gin.Context) {
|
|||||||
}
|
}
|
||||||
nonce++
|
nonce++
|
||||||
|
|
||||||
userId, err := database.GetUid(string(keyDescrypted))
|
// userId, err := database.GetUid(string(keyDescrypted))
|
||||||
if err != nil {
|
// if err != nil {
|
||||||
ctx.String(http.StatusForbidden, "Fuck you!")
|
// ctx.String(http.StatusForbidden, "Fuck you!")
|
||||||
return
|
// return
|
||||||
}
|
// }
|
||||||
|
userId := 9999999
|
||||||
authorizeToken := utils.RandomBase64Token(32)
|
authorizeToken := utils.RandomBase64Token(32)
|
||||||
|
|
||||||
_, err = database.RedisCli.HSet(database.RedisCtx, "token_uid", authorizeToken, userId).Result()
|
_, err = database.RedisCli.HSet(database.RedisCtx, "token_uid", authorizeToken, userId).Result()
|
||||||
|
|||||||
Reference in New Issue
Block a user