From 20331c6d601d8057dafa7c33d41ab573d2e10789 Mon Sep 17 00:00:00 2001 From: Nuwan Date: Sat, 22 Jul 2023 03:59:49 +0530 Subject: [PATCH] fix for version upgrade --- web/app/assets/javascripts/clientUpdate.js | 4 ++-- web/app/controllers/artifacts_controller.rb | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/web/app/assets/javascripts/clientUpdate.js b/web/app/assets/javascripts/clientUpdate.js index 50c559751..4f886255b 100644 --- a/web/app/assets/javascripts/clientUpdate.js +++ b/web/app/assets/javascripts/clientUpdate.js @@ -255,7 +255,6 @@ // check if updated is needed async function check() { - var os = await context.jamClient.GetDetailedOS(); //os = 'Win32' @@ -284,7 +283,8 @@ type: "GET", url: "/api/versioncheck?product=" + product + "&os=" + os, success: function (response) { - if(JSON.stringify(response) !== "{}"){ + console.log('versioncheck response', response) + if(!jQuery.isEmptyObject(response)){ runCheck(product, response.version, response.uri, response.size, currentVersion); } }, diff --git a/web/app/controllers/artifacts_controller.rb b/web/app/controllers/artifacts_controller.rb index c1232b8db..c8eef7469 100644 --- a/web/app/controllers/artifacts_controller.rb +++ b/web/app/controllers/artifacts_controller.rb @@ -62,7 +62,6 @@ class ArtifactsController < ApiController logger.debug "version check from #{product}" - unless ArtifactUpdate::PRODUCTS.include? product render :json => { :errors => { :product => ['not a valid product'] } }, :status => :unprocessable_entity return