This commit is contained in:
Seth Call 2016-12-19 17:09:17 -06:00
parent c43b6cb1b9
commit ea7ed8c65e
1 changed files with 2 additions and 3 deletions

View File

@ -10,10 +10,10 @@ class ArtifactsController < ApiController
if is_jamblaster
# check and see if there is a build just for this JB
clients = ArtifactUpdate.where('product = ? and environment = ?', "JamClient/#{params[:type]}", params[:serialno]).order(:product)
clients = ArtifactUpdate.where('product ilike ? and environment = ?', "JamClient/#{params[:type]}%", params[:serialno]).order(:product)
if clients.count == 0
# if not, then fine, give back the default environment
clients = ArtifactUpdate.where('product = ? and environment = ?', "JamClient/#{params[:type]}", ArtifactUpdate::DEFAULT_ENVIRONMENT).order(:product)
clients = ArtifactUpdate.where('product ilike ? and environment = ?', "JamClient/#{params[:type]}%", ArtifactUpdate::DEFAULT_ENVIRONMENT).order(:product)
end
else
clients = ArtifactUpdate.where("product like '%JamClient%' and environment = '#{ArtifactUpdate::DEFAULT_ENVIRONMENT}'").order(:product)
@ -23,7 +23,6 @@ class ArtifactsController < ApiController
Jamblaster.bootstrap(params[:serialno])
end
#Parameters: {"serialno"=>"NCA-001-160602-00084", "version"=>"dev-20161120-153542", "type"=>"jamblaster"}
#Parameters: {"serialno"=>"NCA-001-160602-00084", "version"=>"dev-20161120-153542", "type"=>"jamblasterclient"}