no message

This commit is contained in:
Kittapath 2024-03-15 10:50:18 +07:00
parent 19e23bd8b1
commit bec8ef3664

View file

@ -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, "ไม่พบข้อมูลเครื่องราชอิสริยาภรณ์นี้");