removed unneeded method

This commit is contained in:
nquidox 2025-09-10 23:09:38 +03:00
parent a3151ed0b5
commit 0dc93fcd16
2 changed files with 0 additions and 41 deletions

View file

@ -27,43 +27,3 @@ func (u *Utils) GetUserUuidFromContext(c *gin.Context) (string, error) {
}
return userUuid.String(), nil
}
func (u *Utils) GetAllTokensFromContext(c *gin.Context) (string, string, error) {
if c == nil {
return "", "", errors.New("context is nil")
}
//get user uuid
userRaw, exists := c.Get("userUuid")
if !exists {
return "", "", errors.New("user uuid not found in context")
}
userUuidStr, ok := userRaw.(string)
if !ok {
return "", "", errors.New("user uuid is not a string")
}
userUuid, err := uuid.Parse(userUuidStr)
if err != nil {
return "", "", errors.New("error parsing user uuid")
}
//get refresh token uuid
refreshRaw, exists := c.Get("refreshUuid")
if !exists {
return "", "", errors.New("refresh uuid not found in context")
}
refreshUuidStr, ok := refreshRaw.(string)
if !ok {
return "", "", errors.New("refresh uuid is not a string")
}
refreshUuid, err := uuid.Parse(refreshUuidStr)
if err != nil {
return "", "", errors.New("error parsing refresh uuid")
}
return userUuid.String(), refreshUuid.String(), nil
}