From d1a1b7dc947063aef5f8375a6a1e03246b272c84 Mon Sep 17 00:00:00 2001 From: HampusM Date: Wed, 18 Aug 2021 17:29:55 +0200 Subject: Implemented caching for certain API endpoints, Added documentation & made backend-fixes --- packages/server/src/git/branch.ts | 5 +++++ 1 file changed, 5 insertions(+) (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 dacabda..85f83be 100644 --- a/packages/server/src/git/branch.ts +++ b/packages/server/src/git/branch.ts @@ -10,6 +10,10 @@ import { createError, ErrorWhere, FailedError, NotFoundError, UnknownError } fro * @extends Reference */ export class Branch extends Reference { + public async repository(): Promise { + return this._owner.withBranch(this.name); + } + /** * Returns the branch's latest commit * @@ -41,6 +45,7 @@ export class Branch extends Reference { } throw(createError(ErrorWhere.Branch, UnknownError)); }); + return new Branch(owner, reference); } -- cgit v1.2.3-18-g5258