예제 #1
0
 public async Task SetAsync([FromBody] CreditOperationModel model)
 {
     try
     {
         await _creditService.UpdateAsync(model.AssetId, model.Amount, model.Comment, model.UserId);
     }
     catch (InvalidOperationException exception)
     {
         throw new ValidationApiException(HttpStatusCode.BadRequest, exception.Message);
     }
     catch (BalanceOperationException exception)
     {
         throw new ValidationApiException(HttpStatusCode.BadRequest, exception.Message);
     }
 }