Skip to content

Commit 243c767

Browse files
committed
fix loop update
1 parent 5828662 commit 243c767

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/Server/Program.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
var builder = WebApplication.CreateBuilder(args);
44
var app = builder.Build();
55

6+
int count = 0;
67
string packageName = "packet_20250102230201638_1.0.0.1";
78

89
app.MapPost("/Upgrade/Report", (ReportDTO request) =>
@@ -12,6 +13,12 @@
1213

1314
app.MapPost("/Upgrade/Verification", (VerifyDTO request) =>
1415
{
16+
count++;
17+
if (count > 2)
18+
{
19+
return HttpResponseDTO<IEnumerable<VerificationResultDTO>>.Success(null,"Upgrade completed.");
20+
}
21+
1522
var filePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "wwwroot", "packages", $"{packageName}.zip");
1623
var packet = new FileInfo(filePath);
1724
var result = new List<VerificationResultDTO>

0 commit comments

Comments
 (0)