diff options
author | HampusM <hampus@hampusmat.com> | 2021-06-25 13:21:56 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2021-06-25 13:21:56 +0200 |
commit | df341dc9b874f7e7bf99d9c1de3a84c49c4a04a6 (patch) | |
tree | fda4bcd92b9119bf4b95d393849d2f643eae8444 /packages/server/src/git/tree.ts | |
parent | a13786d6cc185822f5940582efde2349ef729145 (diff) |
Cleaned up the backend
Diffstat (limited to 'packages/server/src/git/tree.ts')
-rw-r--r-- | packages/server/src/git/tree.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/server/src/git/tree.ts b/packages/server/src/git/tree.ts index b9bd142..8697010 100644 --- a/packages/server/src/git/tree.ts +++ b/packages/server/src/git/tree.ts @@ -12,11 +12,11 @@ export class Tree { this._owner = owner; } - entries(): TreeEntry[] { + public entries(): TreeEntry[] { return this._ng_tree.entries().map(entry => new TreeEntry(this._owner, entry)); } - async find(path: string): Promise<Blob | Tree | null> { + public async find(path: string): Promise<Blob | Tree | null> { const entry = await this._ng_tree.getEntry(path).catch(err => { if(err.errno === -3) { return null; @@ -31,7 +31,7 @@ export class Tree { return entry.isBlob() ? new Blob(entry) : new Tree(this._owner, await entry.getTree()); } - findExists(path: string): Promise<boolean> { + public findExists(path: string): Promise<boolean> { return this._ng_tree.getEntry(path) .then(() => true) .catch(() => false); |