mirror of
https://github.com/GCMatters/hermes.git
synced 2026-02-04 05:30:13 +01:00
Auth endpoints
This commit is contained in:
@@ -48,6 +48,19 @@ public static class EventMapping
|
||||
myEvent.EventRegistrations
|
||||
);
|
||||
}
|
||||
public static EventSummaryNoErDto ToEventSummaryNoErDto(this Event myEvent)
|
||||
{
|
||||
return new EventSummaryNoErDto(
|
||||
myEvent.EventId,
|
||||
myEvent.Organisation!.Name,
|
||||
myEvent.OrganisationId,
|
||||
myEvent.Title,
|
||||
myEvent.Description,
|
||||
myEvent.Location,
|
||||
myEvent.EventDate,
|
||||
myEvent.EventSkills
|
||||
);
|
||||
}
|
||||
|
||||
public static EventDetailsDto ToEventDetailsDto(this Event myEvent)
|
||||
{
|
||||
|
||||
20
WebApp/Mapping/UserMapping.cs
Normal file
20
WebApp/Mapping/UserMapping.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using WebApp.DTOs;
|
||||
using WebApp.Entities;
|
||||
|
||||
namespace WebApp.Mapping
|
||||
{
|
||||
public static class UserMapping
|
||||
{
|
||||
public static UserSummaryDto ToUserSummaryDto(this User user)
|
||||
{
|
||||
return new UserSummaryDto(
|
||||
user.UserId,
|
||||
user.Email,
|
||||
user.FirstName,
|
||||
user.LastName,
|
||||
user.CreatedAt,
|
||||
user.IsOrganisation
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user