From 2e9bf4e12024fcc04481468976ef9156f72e6952 Mon Sep 17 00:00:00 2001 From: Methapon Metanipat Date: Mon, 21 Oct 2024 13:40:03 +0700 Subject: [PATCH] refactor: rename endpoints --- src/controllers/05-quotation-payment-controller.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/controllers/05-quotation-payment-controller.ts b/src/controllers/05-quotation-payment-controller.ts index 57f03a3..95294aa 100644 --- a/src/controllers/05-quotation-payment-controller.ts +++ b/src/controllers/05-quotation-payment-controller.ts @@ -78,12 +78,12 @@ export class QuotationPayment extends Controller { }); } - @Get("{paymentId}/file") + @Get("{paymentId}/attachment") async listPaymentFile(@Path() quotationId: string, @Path() paymentId: string) { return await listFile(fileLocation.quotation.payment(quotationId, paymentId)); } - @Get("{paymentId}/file/{name}") + @Get("{paymentId}/attachment/{name}") async getPaymentFile( @Request() req: express.Request, @Path() quotationId: string, @@ -95,7 +95,7 @@ export class QuotationPayment extends Controller { ); } - @Put("{paymentId}/file/{name}") + @Put("{paymentId}/attachment/{name}") async uploadPayment( @Request() req: express.Request, @Path() quotationId: string, @@ -122,7 +122,7 @@ export class QuotationPayment extends Controller { ); } - @Delete("{paymentId}/file/{name}") + @Delete("{paymentId}/attachment/{name}") async deletePayment( @Path() quotationId: string, @Path() paymentId: string,