add "me" endpoint
This commit is contained in:
parent
98b38f645f
commit
ae1a8d2b97
7 changed files with 49 additions and 10 deletions
|
|
@ -1,12 +1,13 @@
|
|||
using SurveyBackend.Core.Models;
|
||||
using SurveyBackend.DTOs;
|
||||
using SurveyBackend.DTOs.User;
|
||||
|
||||
namespace SurveyBackend.Mappers;
|
||||
|
||||
/// <summary>
|
||||
/// Маппер всего связанного с авторизацией
|
||||
/// </summary>
|
||||
public static class AuthMapper
|
||||
public static class UserMapper
|
||||
{
|
||||
/// <summary>
|
||||
/// Перегнать схему регистрации в нового юзера
|
||||
|
|
@ -20,4 +21,12 @@ public static class AuthMapper
|
|||
LastName = dto.LastName,
|
||||
Password = dto.Password,
|
||||
};
|
||||
|
||||
public static UserOutputDto ModelToOutput(User model) => new UserOutputDto
|
||||
{
|
||||
Id = model.Id,
|
||||
FirstName = model.FirstName,
|
||||
LastName = model.LastName,
|
||||
Email = model.Email,
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue