Skip to content

Commit

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

app.get(`${exports.pathPrefix}/remotes`, ensureAuthenticated, ensurePathExists, (req, res) => {
jsonResultOrFailProm(
res,
gitPromise(['remote'], req.query.path).then(gitParser.parseGitRemotes)
);
let pathToRepo = req.query.path;
nodegit.Repository.open(pathToRepo).then(function (repo) {
jsonResultOrFailProm(res, nodegit.Remote.list(repo));
});
});

app.get(
Expand Down

0 comments on commit 9c87430

Please sign in to comment.