fix: wrong positition store

This commit is contained in:
Methapon2001 2025-02-18 15:38:54 +07:00
parent 0ac81ce743
commit ee33c7abb3

View file

@ -645,14 +645,14 @@ export class CustomerBranchFileController extends Controller {
@Tags("Customer Branch Citizen") @Tags("Customer Branch Citizen")
async listCitizen(@Request() req: RequestWithUser, @Path() branchId: string) { async listCitizen(@Request() req: RequestWithUser, @Path() branchId: string) {
await this.checkPermission(req.user, branchId); await this.checkPermission(req.user, branchId);
return await listFile(fileLocation.customerBranch.attachment(branchId)); return await listFile(fileLocation.customerBranch.citizen(branchId));
} }
@Get("file-citizen/{id}") @Get("file-citizen/{id}")
@Security("keycloak") @Security("keycloak")
@Tags("Customer Branch Citizen") @Tags("Customer Branch Citizen")
async getCitizen(@Path() branchId: string, @Path() id: string) { async getCitizen(@Path() branchId: string, @Path() id: string) {
return await getFile(fileLocation.customerBranch.attachment(branchId, id)); return await getFile(fileLocation.customerBranch.citizen(branchId, id));
} }
@Put("file-citizen/{id}") @Put("file-citizen/{id}")
@ -660,7 +660,7 @@ export class CustomerBranchFileController extends Controller {
@Tags("Customer Branch Citizen") @Tags("Customer Branch Citizen")
async putCitizen(@Request() req: RequestWithUser, @Path() branchId: string, @Path() id: string) { async putCitizen(@Request() req: RequestWithUser, @Path() branchId: string, @Path() id: string) {
await this.checkPermission(req.user, branchId); await this.checkPermission(req.user, branchId);
return req.res?.redirect(await setFile(fileLocation.customerBranch.attachment(branchId, id))); return req.res?.redirect(await setFile(fileLocation.customerBranch.citizen(branchId, id)));
} }
@Delete("file-citizen/{id}") @Delete("file-citizen/{id}")