Do not allow application updates to be cancelled.

This commit is contained in:
Robert Strouse 2024-02-02 15:35:14 -08:00
parent 8bdfd214b5
commit 234f9d9eb5
8 changed files with 21 additions and 13 deletions

View file

@ -1090,9 +1090,11 @@ void Web::begin() {
if(server.method() == HTTP_OPTIONS) { server.send(200, "OK"); return; }
DynamicJsonDocument sdoc(512);
JsonObject sobj = sdoc.to<JsonObject>();
git.status = GIT_UPDATE_CANCELLING;
git.toJSON(sobj);
git.cancelled = true;
if(!git.lockFS) {
git.status = GIT_UPDATE_CANCELLING;
git.toJSON(sobj);
git.cancelled = true;
}
serializeJson(sdoc, g_content);
server.send(200, _encoding_json, g_content);
});