Fix
This commit is contained in:
parent
83406751c7
commit
ac1599485a
4 changed files with 28 additions and 11 deletions
|
|
@ -24,7 +24,7 @@ import { Equal, ILike, In, IsNull, Like, Not, Brackets, Between } from "typeorm"
|
|||
import { InsigniaType, CreateInsigniaType, UpdateInsigniaType } from "../entities/InsigniaType";
|
||||
import { Insignia, CreateInsignias, UpdateInsignias } from "../entities/Insignia";
|
||||
|
||||
@Route("api/v1/org/insignia/Insignias")
|
||||
@Route("api/v1/org/insignia/insignia")
|
||||
@Tags("Insignia")
|
||||
@Security("bearerAuth")
|
||||
@Response(
|
||||
|
|
@ -180,10 +180,9 @@ export class InsigniaController extends Controller {
|
|||
const insigniaAll = await this.insigniaRepository.find({
|
||||
relations: ["insigniaType"],
|
||||
select: ["id", "name", "shortName", "createdAt", "lastUpdatedAt", "lastUpdateFullName", "isActive", "note"],
|
||||
order: { "level": "ASC" }
|
||||
});
|
||||
if (!insigniaAll) {
|
||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลเครื่องราชอิสริยาภรณ์นี้");
|
||||
}
|
||||
|
||||
const mapInsigniaAll = insigniaAll.map((item) => ({
|
||||
id: item.id,
|
||||
name: item.name,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue