add "me" endpoint

This commit is contained in:
Вячеслав 2025-05-13 18:09:06 +05:00
parent 98b38f645f
commit ae1a8d2b97
7 changed files with 49 additions and 10 deletions

View file

@ -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,
};
}