Ejemplo n.º 1
0
        public async Task <IActionResult> GetMeeting([FromRoute] int meetingId)
        {
            int userId = GetUserId();

            var result = await _meetingsManager.GetMeeting(meetingId, userId);

            if (!result.Success)
            {
                return(BadRequest(result.Message));
            }

            var mapped = _mapper.Map <MeetingResponse>(result.Entity);

            return(Ok(mapped));
        }
Ejemplo n.º 2
0
        public IActionResult Get(int id)
        {
            var meeting = _meetingsManager.GetMeeting(id);

            if (meeting == null)
            {
                return(NotFound());
            }

            return(Json(meeting));
        }