continue minIo, rename convertion methods and http methods
This commit is contained in:
@@ -11,7 +11,7 @@ import (
|
||||
"github.com/google/uuid"
|
||||
)
|
||||
|
||||
func GetUserById(ctx context.Context, userId uuid.UUID) (*types.User, error) {
|
||||
func getUserById(ctx context.Context, userId uuid.UUID) (*types.User, error) {
|
||||
user, err := cache.CacheGetUserById(userId)
|
||||
if err != nil {
|
||||
user = &types.User{Id: userId}
|
||||
@@ -24,10 +24,10 @@ func GetUserById(ctx context.Context, userId uuid.UUID) (*types.User, error) {
|
||||
return user, nil
|
||||
}
|
||||
|
||||
func GetUserByToken(ctx context.Context, token string) (*types.User, error) {
|
||||
func getUserByToken(ctx context.Context, token string) (*types.User, error) {
|
||||
userId, err := tokens.TokenValidateGetId(token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return GetUserById(ctx, userId)
|
||||
return getUserById(ctx, userId)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user