update entity OrgGroup
This commit is contained in:
parent
bea20bb46b
commit
2dc74fc7d2
7 changed files with 22 additions and 41 deletions
|
|
@ -179,25 +179,4 @@ export class OrgRootController extends Controller {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* รายละเอียดโครงสร้างระดับ Root
|
||||
*
|
||||
* @summary ORG_016 - รายละเอียดโครงสร้างระดับ Root (ADMIN) #16
|
||||
*
|
||||
* @param {string} id Guid, *Id root
|
||||
*/
|
||||
@Get("root/{id}")
|
||||
async detail(@Path() id: string) {
|
||||
try {
|
||||
const orgRoot = await this.orgRootRepository.findOne({ where: { id } });
|
||||
|
||||
if (!orgRoot) {
|
||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูล");
|
||||
}
|
||||
|
||||
return new HttpSuccess(orgRoot);
|
||||
} catch (error) {
|
||||
return error;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue