Skip to content

Identity service method are not work correctly #1

@senoldinc

Description

@senoldinc

Those methods name must be displaced

public async Task GetUserIdAsync(string userName)
{
var user = await _userManager.Users.FirstOrDefaultAsync(x => x.UserName == userName);
if (user == null)
{
throw new NotFoundException("User not found");
//throw new Exception("User not found");
}
return await _userManager.GetUserIdAsync(user);
}

    public async Task<string> GetUserNameAsync(string userId)
    {
        var user = await _userManager.Users.FirstOrDefaultAsync(x => x.Id == userId);
        if (user == null)
        {
            throw new NotFoundException("User not found");
            //throw new Exception("User not found");
        }
        return await _userManager.GetUserNameAsync(user);
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions