fix: wrong position

This commit is contained in:
Methapon Metanipat 2024-09-09 15:46:48 +07:00
parent 213ec28565
commit 1a804610bd
2 changed files with 2 additions and 2 deletions

View file

@ -814,7 +814,7 @@ export class BranchController extends Controller {
throw new HttpError(HttpStatus.NOT_FOUND, "Branch cannot be found.", "branchNotFound");
}
return await listFile(fileLocation.user.profile(branchId));
return await listFile(fileLocation.branch.img(branchId));
}
@Get("{branchId}/image/{name}")

View file

@ -44,7 +44,7 @@ export const fileLocation = {
image: (branchId: string) => `branch/branch-img-${branchId}`,
map: (branchId: string) => `branch/map-img-${branchId}`,
bank: (branchId: string, bankId: string) => `branch/bank-qr-${branchId}-${bankId}`,
img: (branchId: string, name?: string) => `user/img-${branchId}/${name || ""}`,
img: (branchId: string, name?: string) => `branch/img-${branchId}/${name || ""}`,
},
user: {
profile: (userId: string, name?: string) => `user/profile-image-${userId}/${name || ""}`,