แก้ชื่อ tag
This commit is contained in:
parent
4b4f2423fa
commit
f509e10f8c
9 changed files with 151 additions and 107 deletions
|
|
@ -159,6 +159,14 @@ export class OrgChild1Controller {
|
|||
throw new HttpError(HttpStatusCode.NOT_FOUND, "not found. RootId");
|
||||
}
|
||||
|
||||
const validOrgChild1Ranks = ["OFFICE", "DIVISION", "SECTION"];
|
||||
if (
|
||||
requestBody.orgChild1Rank == null ||
|
||||
!validOrgChild1Ranks.includes(requestBody.orgChild1Rank.toUpperCase())
|
||||
) {
|
||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "not found. orgChild2Rank");
|
||||
}
|
||||
|
||||
const child1 = await this.child1Repository.findOne({ where: { id } });
|
||||
if (!child1) {
|
||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "not found.");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue