Skip to content

Commit

Permalink
Replace remote delete
Browse files Browse the repository at this point in the history
  • Loading branch information
ylecuyer authored and wmertens committed Apr 27, 2020
1 parent 31277b1 commit d02b74c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion source/git-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -688,7 +688,11 @@ exports.registerApi = (env) => {
ensureAuthenticated,
ensurePathExists,
(req, res) => {
jsonResultOrFailProm(res, gitPromise(['remote', 'remove', req.params.name], req.query.path));
let name = req.params.name;
let pathToRepo = req.body.path;
nodegit.Repository.open(pathToRepo).then(function (repo) {
jsonResultOrFailProm(res, nodegit.Remote.delete(repo, name));
});
}
);

Expand Down

0 comments on commit d02b74c

Please sign in to comment.