no message
This commit is contained in:
parent
15c7401552
commit
3a0e295bba
3 changed files with 40 additions and 3 deletions
|
|
@ -2884,6 +2884,23 @@ export class OrganizationController extends Controller {
|
|||
return new HttpSuccess(data.map((x) => x.id));
|
||||
}
|
||||
|
||||
/**
|
||||
* API
|
||||
*
|
||||
* @summary
|
||||
*
|
||||
*/
|
||||
@Get("active/root/latest")
|
||||
async GetActiveRootIdLatest() {
|
||||
const orgRevisionActive = await this.orgRevisionRepository.findOne({
|
||||
where: { orgRevisionIsCurrent: true, orgRevisionIsDraft: false },
|
||||
});
|
||||
if (!orgRevisionActive) {
|
||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบโครงสร้างที่เผยแพร๋อยู่ตอนนี้");
|
||||
}
|
||||
return new HttpSuccess(orgRevisionActive.id);
|
||||
}
|
||||
|
||||
/**
|
||||
* API หาสำนักทั้งหมด by revision
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue