From f6a5fe05c887a658c20257d2ef6bf2780f792873 Mon Sep 17 00:00:00 2001 From: HampusM Date: Tue, 27 Jul 2021 13:18:42 +0200 Subject: Refactored the backend a bit & added TSDoc/JSDoc comments to the diff class --- packages/server/src/git/branch.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'packages/server/src/git/branch.ts') diff --git a/packages/server/src/git/branch.ts b/packages/server/src/git/branch.ts index 7ddf672..4737279 100644 --- a/packages/server/src/git/branch.ts +++ b/packages/server/src/git/branch.ts @@ -16,7 +16,7 @@ export class Branch extends Reference { * @returns A commit summary instance */ public async latestCommit(): Promise { - const latest_commit = this._owner.nodegitRepository.getBranchCommit(this._ng_reference).catch(() => { + const latest_commit = this._owner.ng_repository.getBranchCommit(this._ng_reference).catch(() => { throw(createError(BranchError, 500, "Failed to get the latest commit")); }); @@ -35,7 +35,7 @@ export class Branch extends Reference { * @returns An instance of a branch */ public static async lookup(owner: Repository, branch: string): Promise { - const reference = await owner.nodegitRepository.getBranch(branch).catch(err => { + const reference = await owner.ng_repository.getBranch(branch).catch(err => { if(err.errno === -3) { throw(createError(BranchError, 404, "Branch not found!")); } -- cgit v1.2.3-18-g5258