refactor: rename endpoints

This commit is contained in:
Methapon Metanipat 2024-10-21 13:40:03 +07:00
parent e2bdcb4bd8
commit 2e9bf4e120

View file

@ -78,12 +78,12 @@ export class QuotationPayment extends Controller {
}); });
} }
@Get("{paymentId}/file") @Get("{paymentId}/attachment")
async listPaymentFile(@Path() quotationId: string, @Path() paymentId: string) { async listPaymentFile(@Path() quotationId: string, @Path() paymentId: string) {
return await listFile(fileLocation.quotation.payment(quotationId, paymentId)); return await listFile(fileLocation.quotation.payment(quotationId, paymentId));
} }
@Get("{paymentId}/file/{name}") @Get("{paymentId}/attachment/{name}")
async getPaymentFile( async getPaymentFile(
@Request() req: express.Request, @Request() req: express.Request,
@Path() quotationId: string, @Path() quotationId: string,
@ -95,7 +95,7 @@ export class QuotationPayment extends Controller {
); );
} }
@Put("{paymentId}/file/{name}") @Put("{paymentId}/attachment/{name}")
async uploadPayment( async uploadPayment(
@Request() req: express.Request, @Request() req: express.Request,
@Path() quotationId: string, @Path() quotationId: string,
@ -122,7 +122,7 @@ export class QuotationPayment extends Controller {
); );
} }
@Delete("{paymentId}/file/{name}") @Delete("{paymentId}/attachment/{name}")
async deletePayment( async deletePayment(
@Path() quotationId: string, @Path() quotationId: string,
@Path() paymentId: string, @Path() paymentId: string,