From c75c3ef651086fa4647d664b9ada8bdbdc33939f Mon Sep 17 00:00:00 2001 From: Kittapath Date: Mon, 10 Jun 2024 09:39:13 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=E0=B8=95=E0=B8=B1?= =?UTF-8?q?=E0=B8=A7=E0=B9=81=E0=B8=9B=E0=B8=A3=E0=B9=80=E0=B8=84=E0=B8=A3?= =?UTF-8?q?=E0=B8=B7=E0=B9=88=E0=B8=AD=E0=B8=87=E0=B8=A3=E0=B8=B2=E0=B8=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/controllers/InsigniaController.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/controllers/InsigniaController.ts b/src/controllers/InsigniaController.ts index 420d1ca9..e4fb79b1 100644 --- a/src/controllers/InsigniaController.ts +++ b/src/controllers/InsigniaController.ts @@ -219,7 +219,7 @@ export class InsigniaController extends Controller { * */ @Put("sort/{insigniaTypeId}") - async Sort(@Path() insigniaTypeId: string, @Body() requestBody: { sortId: string[] }) { + async Sort(@Path() insigniaTypeId: string, @Body() requestBody: { id: string[] }) { const insigniaType = await this.insigniaTypeRepository.findOne({ where: { id: insigniaTypeId }, }); @@ -237,7 +237,7 @@ export class InsigniaController extends Controller { const sortLevel = insignia.map((data) => ({ id: data.id, - level: requestBody.sortId.indexOf(data.id) + 1, + level: requestBody.id.indexOf(data.id) + 1, })); await this.insigniaRepository.save(sortLevel);