main #3

Merged
Hlop4ik4 merged 237 commits from v.moiseev/distributed-computing:main into main 2024-01-06 17:16:53 +04:00
Showing only changes of commit 8679c69ca6 - Show all commits

View File

@ -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)