Fixed map profile, added migration for services
This commit is contained in:
@ -7,7 +7,10 @@ namespace Birdmap.API.MapperProfiles
|
||||
{
|
||||
public BirdmapProfile()
|
||||
{
|
||||
CreateMap<User, DTOs.AuthenticateResponse>().ReverseMap();
|
||||
CreateMap<User, DTOs.AuthenticateResponse>()
|
||||
.ForMember(m => m.Username, opt => opt.MapFrom(m => m.Name))
|
||||
.ForMember(m => m.UserRole, opt => opt.MapFrom(m => m.Role))
|
||||
.ReverseMap();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user