public async Task <EventApiResponse> UpdateEvent(Guid id, [FromForm] CreateEventApiRequest request) { CreateEvent @event = _mapper.Map <CreateEvent>(request); Event updated = await _eventAdminService.UpdateEvent(GetMemberId(), id, @event); return(_mapper.Map <EventApiResponse>(updated)); }
public async Task <ActionResult <EventApiResponse> > Post([FromForm] CreateEventApiRequest request) { CreateEvent @event = _mapper.Map <CreateEvent>(request); Event created = await _eventAdminService.CreateEvent(GetMemberId(), @event); EventApiResponse response = _mapper.Map <EventApiResponse>(created); return(Created(response)); }