This commit is contained in:
Софья Островская 2023-12-16 14:54:30 +04:00
parent 32a64d3455
commit 8679c69ca6

View File

@ -48,7 +48,7 @@ app.MapGet("/{uuid}", (Guid uuid) =>
.WithName("GetAgreementByGUID")
.WithOpenApi();
app.MapPost("/{number}/{date}/{sum}/{idRequest}", (string? number, DateOnly date, decimal sum, Guid idRequest) =>
app.MapPost("/{number}/{idRequest}", (string? number, Guid idRequest) =>
{
Guid NewGuid = Guid.NewGuid();
agrs.Add(new Contract() { Uuid = NewGuid, Number = (string)number, IdRequest = (Guid)idRequest });
@ -66,7 +66,7 @@ app.MapPost("/{number}/{date}/{sum}/{idRequest}", (string? number, DateOnly date
.WithName("PostAgreement")
.WithOpenApi();
app.MapPatch("/{uuid}/{number}/{date}/{sum}/{idRequest}", (Guid uuid, string? number, DateOnly date, decimal sum, Guid idRequest) =>
app.MapPatch("/{uuid}/{number}/{idRequest}", (Guid uuid, string? number, Guid idRequest) =>
{
var agr = agrs.FirstOrDefault(r => r.Uuid == uuid);
if (agr == null)