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) #
|
* @summary ORG_038 - จัดลำดับแสดงผลเครื่องราชอิสริยาภรณ์ (ADMIN) #
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Post("sort")
|
@Put("sort/{insigniaTypeId}")
|
||||||
async Sort(@Body() requestBody: { insigniaTypeId: string; sortId: string[] }) {
|
async Sort(@Path() insigniaTypeId: string, @Body() requestBody: { sortId: string[] }) {
|
||||||
const insigniaType = await this.insigniaTypeRepository.findOne({
|
const insigniaType = await this.insigniaTypeRepository.findOne({
|
||||||
where: { id: requestBody.insigniaTypeId },
|
where: { id: insigniaTypeId },
|
||||||
});
|
});
|
||||||
if (!insigniaType) {
|
if (!insigniaType) {
|
||||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลลำดับเครื่องราชอิสริยาภรณ์นี้");
|
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลลำดับเครื่องราชอิสริยาภรณ์นี้");
|
||||||
|
|
@ -229,7 +229,7 @@ export class InsigniaController extends Controller {
|
||||||
|
|
||||||
const insignia = await this.insigniaRepository.find({
|
const insignia = await this.insigniaRepository.find({
|
||||||
select: ["id", "level"],
|
select: ["id", "level"],
|
||||||
where: { insigniaTypeId: requestBody.insigniaTypeId },
|
where: { insigniaTypeId: insigniaTypeId },
|
||||||
});
|
});
|
||||||
if (!insignia) {
|
if (!insignia) {
|
||||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลเครื่องราชอิสริยาภรณ์นี้");
|
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลเครื่องราชอิสริยาภรณ์นี้");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue