แก้ตัวแปรเครื่องราช
This commit is contained in:
parent
364d1fc1a7
commit
c75c3ef651
1 changed files with 2 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue