mirror of https://github.com/docker/docs.git
Fix update to tags API
Signed-off-by: Jeffrey Morgan <jmorganca@gmail.com>
This commit is contained in:
parent
ae7535723d
commit
56c39c9c7f
|
|
@ -103,11 +103,11 @@ module.exports = {
|
||||||
}, (error, response, body) => {
|
}, (error, response, body) => {
|
||||||
if (response.statusCode === 200) {
|
if (response.statusCode === 200) {
|
||||||
let data = JSON.parse(body);
|
let data = JSON.parse(body);
|
||||||
tagServerActions.tagsUpdated({repo, tags: data});
|
tagServerActions.tagsUpdated({repo, tags: data.results || []});
|
||||||
if (callback) { callback(null, data); }
|
if (callback) { callback(null, data.results || []); }
|
||||||
} else if (error || response.statusCode === 401) {
|
} else {
|
||||||
repositoryServerActions.error({repo});
|
repositoryServerActions.error({repo});
|
||||||
if (callback) { callback(new Error('Failed to fetch repos')); }
|
if (callback) { callback(new Error('Failed to fetch tags for repo')); }
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue