Skip to content

Commit

Permalink
prioritizing readability
Browse files Browse the repository at this point in the history
  • Loading branch information
Edrisym committed Nov 27, 2024
1 parent 4ebaeff commit e0c2079
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions EWallet.Api/Currencies/EndPoints/CurrencyEndPoints.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ public static void MapCurrencyEndpoints(this WebApplication app)
}
catch (Exception e)
{
return e.InnerException!.Message.Contains("duplicate")
? Results.Conflict(ErrorMessages.DuplicateInput)
: Results.BadRequest(StatusCodes.Status500InternalServerError);
if (e.InnerException!.Message.Contains("duplicate"))
return Results.Conflict(ErrorMessages.DuplicateInput);
return Results.BadRequest(StatusCodes.Status500InternalServerError);
}
}).AllowAnonymous();
}
Expand Down
6 changes: 3 additions & 3 deletions EWallet.Api/Wallets/EndPoints/WalletEndPoints.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ public static void MapWalletsEndpoints(this WebApplication app)
}
catch (Exception e)
{
return e.InnerException!.Message.Contains("duplicate")
? Results.Conflict(ErrorMessages.DuplicateInput)
: Results.BadRequest(StatusCodes.Status500InternalServerError);
if (e.InnerException!.Message.Contains("duplicate"))
return Results.Conflict(ErrorMessages.DuplicateInput);
return Results.BadRequest(StatusCodes.Status500InternalServerError);
}
}).AllowAnonymous();
}
Expand Down

0 comments on commit e0c2079

Please sign in to comment.