diff --git a/src/controllers/01-branch-controller.ts b/src/controllers/01-branch-controller.ts index 0817826..20e5b36 100644 --- a/src/controllers/01-branch-controller.ts +++ b/src/controllers/01-branch-controller.ts @@ -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}") diff --git a/src/utils/minio.ts b/src/utils/minio.ts index a62a6b0..7fccef3 100644 --- a/src/utils/minio.ts +++ b/src/utils/minio.ts @@ -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 || ""}`,