From a416f7d04edc2e5c14a5c77dd6eea80a8601a454 Mon Sep 17 00:00:00 2001 From: Methapon2001 <61303214+Methapon2001@users.noreply.github.com> Date: Fri, 10 Jan 2025 10:19:40 +0700 Subject: [PATCH] refactor: use # instead of private --- src/controllers/05-quotation-controller.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/controllers/05-quotation-controller.ts b/src/controllers/05-quotation-controller.ts index 7da7cb4..a85d8aa 100644 --- a/src/controllers/05-quotation-controller.ts +++ b/src/controllers/05-quotation-controller.ts @@ -1036,7 +1036,7 @@ export class QuotationActionController extends Controller { @Route("api/v1/quotation/{quotationId}/attachment") @Tags("Quotation") export class QuotationFileController extends Controller { - private async checkPermission(user: RequestWithUser["user"], id: string) { + async #checkPermission(user: RequestWithUser["user"], id: string) { const data = await prisma.quotation.findUnique({ include: { registeredBranch: { @@ -1052,7 +1052,7 @@ export class QuotationFileController extends Controller { @Get() @Security("keycloak") async listAttachment(@Request() req: RequestWithUser, @Path() quotationId: string) { - await this.checkPermission(req.user, quotationId); + await this.#checkPermission(req.user, quotationId); return await listFile(fileLocation.quotation.attachment(quotationId)); } @@ -1074,7 +1074,7 @@ export class QuotationFileController extends Controller { @Path() quotationId: string, @Path() name: string, ) { - await this.checkPermission(req.user, quotationId); + await this.#checkPermission(req.user, quotationId); return await getFile(fileLocation.quotation.attachment(quotationId, name)); } @@ -1085,7 +1085,7 @@ export class QuotationFileController extends Controller { @Path() quotationId: string, @Path() name: string, ) { - await this.checkPermission(req.user, quotationId); + await this.#checkPermission(req.user, quotationId); return await setFile(fileLocation.quotation.attachment(quotationId, name)); } @@ -1096,7 +1096,7 @@ export class QuotationFileController extends Controller { @Path() quotationId: string, @Path() name: string, ) { - await this.checkPermission(req.user, quotationId); + await this.#checkPermission(req.user, quotationId); return await deleteFile(fileLocation.quotation.attachment(quotationId, name)); } }