This commit is contained in:
2026-02-28 23:00:57 +08:00
parent b46f6dbfc2
commit d2d92e222d
4 changed files with 6 additions and 5 deletions
+2 -1
View File
@@ -106,6 +106,7 @@ func GetTokenInfo(userID int) (*TokenInfo, error) {
tokenInfo, exists := tokenMap[userID]
if !exists {
return nil, fmt.Errorf("Token not found for userID %d", userID)
}
return tokenInfo, nil
@@ -116,7 +117,7 @@ func extractUserIDFromToken(token string) (int, error) {
defer tokenMux.RUnlock()
for userID, tokenInfo := range tokenMap {
if tokenInfo.Token == token {
postLog.Debug(fmt.Sprintf("[extractUserIDFromToken] Extracted userID %d from token: %s", userID, token))
// postLog.Debug(fmt.Sprintf("[extractUserIDFromToken] Extracted userID %d from token: %s", userID, token))
return userID, nil
}
}