From bec8ef36643c462a7dcf976b91aa41d1931e992a Mon Sep 17 00:00:00 2001 From: Kittapath Date: Fri, 15 Mar 2024 10:50:18 +0700 Subject: [PATCH] no message --- src/controllers/InsigniaController.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/controllers/InsigniaController.ts b/src/controllers/InsigniaController.ts index 0068234a..420d1ca9 100644 --- a/src/controllers/InsigniaController.ts +++ b/src/controllers/InsigniaController.ts @@ -218,10 +218,10 @@ export class InsigniaController extends Controller { * @summary ORG_038 - จัดลำดับแสดงผลเครื่องราชอิสริยาภรณ์ (ADMIN) # * */ - @Post("sort") - async Sort(@Body() requestBody: { insigniaTypeId: string; sortId: string[] }) { + @Put("sort/{insigniaTypeId}") + async Sort(@Path() insigniaTypeId: string, @Body() requestBody: { sortId: string[] }) { const insigniaType = await this.insigniaTypeRepository.findOne({ - where: { id: requestBody.insigniaTypeId }, + where: { id: insigniaTypeId }, }); if (!insigniaType) { throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลลำดับเครื่องราชอิสริยาภรณ์นี้"); @@ -229,7 +229,7 @@ export class InsigniaController extends Controller { const insignia = await this.insigniaRepository.find({ select: ["id", "level"], - where: { insigniaTypeId: requestBody.insigniaTypeId }, + where: { insigniaTypeId: insigniaTypeId }, }); if (!insignia) { throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลเครื่องราชอิสริยาภรณ์นี้");