From df341dc9b874f7e7bf99d9c1de3a84c49c4a04a6 Mon Sep 17 00:00:00 2001 From: HampusM Date: Fri, 25 Jun 2021 13:21:56 +0200 Subject: Cleaned up the backend --- packages/server/src/git/commit.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'packages/server/src/git/commit.ts') diff --git a/packages/server/src/git/commit.ts b/packages/server/src/git/commit.ts index 64bae4d..5d86eb4 100644 --- a/packages/server/src/git/commit.ts +++ b/packages/server/src/git/commit.ts @@ -38,11 +38,11 @@ export class Commit { this.message = commit.message(); } - async diff(): Promise { - return Diff.get((await this._ng_commit.getDiff())[0]); + public async diff(): Promise { + return new Diff((await this._ng_commit.getDiff())[0]); } - async stats(): Promise { + public async stats(): Promise { const stats = await (await this._ng_commit.getDiff())[0].getStats(); return { @@ -52,16 +52,16 @@ export class Commit { }; } - async tree(): Promise { + public async tree(): Promise { return new Tree(this._owner, await this._ng_commit.getTree()); } - static async lookup(repository: Repository, id: string | NodeGitOid): Promise { + public static async lookup(repository: Repository, id: string | NodeGitOid): Promise { const commit = await NodeGitCommit.lookup(repository.nodegitRepository, id instanceof NodeGitOid ? id : NodeGitOid.fromString(id)); return new Commit(repository, commit); } - static lookupExists(repository: Repository, id: string): Promise { + public static lookupExists(repository: Repository, id: string): Promise { return NodeGitCommit.lookup(repository.nodegitRepository, NodeGitOid.fromString(id)) .then(() => true) .catch(() => false); -- cgit v1.2.3-18-g5258