server-ts: Convert routes/api/branches

This commit is contained in:
Elian Doran
2024-04-05 20:33:04 +03:00
parent 706b9d0f46
commit fd77c5e8c4
4 changed files with 32 additions and 30 deletions

View File

@@ -129,7 +129,7 @@ export default class Becca {
return this.branches[branchId];
}
getBranchOrThrow(branchId: string): BBranch | null {
getBranchOrThrow(branchId: string): BBranch {
const branch = this.getBranch(branchId);
if (!branch) {
throw new NotFoundError(`Branch '${branchId}' was not found in becca.`);