From 9c8743069010fb09b422fbbc38eab549331a285b Mon Sep 17 00:00:00 2001 From: Yoann Lecuyer Date: Wed, 15 Aug 2018 22:51:11 +0200 Subject: [PATCH] replace remotes --- source/git-api.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/git-api.js b/source/git-api.js index 962d01a51..8efd9a354 100644 --- a/source/git-api.js +++ b/source/git-api.js @@ -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(