Skip to content

Commit

Permalink
New fix for the missing URL in the search feature
Browse files Browse the repository at this point in the history
  • Loading branch information
conradoqg committed Apr 27, 2018
1 parent 8b87219 commit 085c1e5
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/arte-cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,15 +97,15 @@ const receiveArtifact = async (url, bucket, name, version, metadata, token, prog

const searchArtifact = async (url, bucket, artifact, version, metadata, token, exactMatch) => {
try {
let url = `${url}/api/artifacts/search?&partial=${!exactMatch}`;
let searchURL = `${url}/api/artifacts/search?&partial=${!exactMatch}`;

if (bucket) url += '&bucket=' + bucket;
if (artifact) url += '&artifact=' + artifact;
if (version) url += '&version=' + version;
if (metadata) url += '&' + metadata.replace(/,/g, '&');
if (bucket) searchURL += '&bucket=' + bucket;
if (artifact) searchURL += '&artifact=' + artifact;
if (version) searchURL += '&version=' + version;
if (metadata) searchURL += '&' + metadata.replace(/,/g, '&');

const result = await superagent
.get(url)
.get(searchURL)
.set((token ? { Authorization: token } : {}))
.accept('application/json');

Expand Down

0 comments on commit 085c1e5

Please sign in to comment.