mirror of
https://github.com/Sea-Haven-Industries/shoc-backend.git
synced 2026-10-05 15:22:08 +00:00
24 lines
682 B
C#
24 lines
682 B
C#
using SeaHaven.Services.DTOs;
|
|
|
|
namespace Api.SeaHavenIndustries.DTOs
|
|
{
|
|
/// <summary>The session payload the web app stores after sign-in.</summary>
|
|
public static class LoginPayload
|
|
{
|
|
public static object From(LoginResultDTO result)
|
|
{
|
|
ArgumentNullException.ThrowIfNull(result);
|
|
|
|
return new
|
|
{
|
|
token = result.Token,
|
|
expiration = result.Expiration,
|
|
email = result.Email,
|
|
userRoles = result.UserRole,
|
|
phoneNumber = result.PhoneNumber,
|
|
fullname = result.Fullname,
|
|
id = result.Id
|
|
};
|
|
}
|
|
}
|
|
}
|