main #3
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user