コード例 #1
0
        public async Task <ActionResult <string> > AddComplaint(AddComplaintDto addComplaintDto)
        {
            try
            {
                var complaints = await _complaintService.AddComlaint(addComplaintDto);

                return(Ok(complaints));
            }
            catch (UnauthorizedAccessException ex)
            {
                return(Forbid(ex.Message));
            }
            catch (Exception ex)
            {
                return(BadRequest(ex.Message));
            }
        }