Skip to content

Commit

Permalink
fix loop update
Browse files Browse the repository at this point in the history
  • Loading branch information
JusterZhu committed Jan 17, 2025
1 parent 5828662 commit 243c767
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/Server/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
var builder = WebApplication.CreateBuilder(args);
var app = builder.Build();

int count = 0;
string packageName = "packet_20250102230201638_1.0.0.1";

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

app.MapPost("/Upgrade/Verification", (VerifyDTO request) =>
{
count++;
if (count > 2)
{
return HttpResponseDTO<IEnumerable<VerificationResultDTO>>.Success(null,"Upgrade completed.");
}

var filePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "wwwroot", "packages", $"{packageName}.zip");
var packet = new FileInfo(filePath);
var result = new List<VerificationResultDTO>
Expand Down

0 comments on commit 243c767

Please sign in to comment.