示例#1
0
 public async Task <IActionResult> Register(JObject body)
 {
     try
     {
         return(Ok(await authHandler.Register(body)));
     }
     catch (BadRequestException ex)
     {
         return(Ok(APIResult.ErrorResult(HttpStatusCode.BadRequest, ex.Message)));
     }
     catch (Exception ex)
     {
         return(Ok(APIResult.ErrorResult(HttpStatusCode.InternalServerError, ex.Message)));
     }
 }