File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -29,11 +29,17 @@ public async Task StartAsync(int port = 5000)
2929
3030 _app = builder . Build ( ) ;
3131
32- // GET /Upgrade/Verification
33- _app . MapGet ( "/Upgrade/Verification" , async ( HttpContext context ) =>
32+ // POST /Upgrade/Verification
33+ _app . MapPost ( "/Upgrade/Verification" , async ( HttpContext context ) =>
3434 {
3535 var q = context . Request . Query ;
3636 var currentVer = q [ "currentVersion" ] . ToString ( ) ;
37+ // Fallback: read from form body if query string is empty
38+ if ( string . IsNullOrEmpty ( currentVer ) && context . Request . HasFormContentType )
39+ {
40+ var form = await context . Request . ReadFormAsync ( ) ;
41+ currentVer = form [ "currentVersion" ] . ToString ( ) ;
42+ }
3743 _ = int . TryParse ( q [ "appType" ] . ToString ( ) , out var appType ) ;
3844
3945 var match = Updates . Find ( u => u . CurrentVersion == currentVer ) ;
You can’t perform that action at this time.
0 commit comments