main #3
@ -48,7 +48,7 @@ app.MapGet("/{uuid}", (Guid uuid) =>
|
|||||||
.WithName("GetAgreementByGUID")
|
.WithName("GetAgreementByGUID")
|
||||||
.WithOpenApi();
|
.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();
|
Guid NewGuid = Guid.NewGuid();
|
||||||
agrs.Add(new Contract() { Uuid = NewGuid, Number = (string)number, IdRequest = (Guid)idRequest });
|
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")
|
.WithName("PostAgreement")
|
||||||
.WithOpenApi();
|
.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);
|
var agr = agrs.FirstOrDefault(r => r.Uuid == uuid);
|
||||||
if (agr == null)
|
if (agr == null)
|
||||||
|
Loading…
Reference in New Issue
Block a user