Skip to content

Commit

Permalink
replace tags
Browse files Browse the repository at this point in the history
  • Loading branch information
ylecuyer authored and wmertens committed Apr 27, 2020
1 parent 9c87430 commit 3a93b5f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions source/git-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -547,8 +547,10 @@ exports.registerApi = (env) => {
);

app.get(`${exports.pathPrefix}/tags`, ensureAuthenticated, ensurePathExists, (req, res) => {
const task = gitPromise(['tag', '-l'], req.query.path).then(gitParser.parseGitTags);
jsonResultOrFailProm(res, task);
let pathToRepo = req.query.path;
nodegit.Repository.open(pathToRepo).then(function (repo) {
jsonResultOrFailProm(res, nodegit.Tag.list(repo));
});
});

app.get(
Expand Down

0 comments on commit 3a93b5f

Please sign in to comment.