예제 #1
0
        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));
        }
예제 #2
0
        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));
        }