no message
This commit is contained in:
parent
19e23bd8b1
commit
bec8ef3664
1 changed files with 4 additions and 4 deletions
|
|
@ -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, "ไม่พบข้อมูลเครื่องราชอิสริยาภรณ์นี้");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue