コード例 #1
0
 public async Task <IActionResult> AcceptOrDenyContact([FromRoute(Name = "id")] Guid demandId, [FromBody] DemandDto demand)
 {
     try
     {
         var myId = ExtractIdFromToken(Request.Headers[HttpRequestHeader.Authorization.ToString()]);
         return(Ok(await service.AcceptOrDenyContact(myId, demandId, demand)));
     }
     catch (HttpResponseException)
     {
         throw;
     }
     catch (Exception)
     {
         throw new BadRequestApiException();
     }
 }