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) => {
|
||||
if (response.statusCode === 200) {
|
||||
let data = JSON.parse(body);
|
||||
tagServerActions.tagsUpdated({repo, tags: data});
|
||||
if (callback) { callback(null, data); }
|
||||
} else if (error || response.statusCode === 401) {
|
||||
tagServerActions.tagsUpdated({repo, tags: data.results || []});
|
||||
if (callback) { callback(null, data.results || []); }
|
||||
} else {
|
||||
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