api เช็คสถานะโครงสร้าง
This commit is contained in:
parent
8d48dc8af7
commit
5bba5822ea
7 changed files with 57 additions and 448 deletions
|
|
@ -668,6 +668,28 @@ export class OrganizationController extends Controller {
|
|||
return new HttpSuccess(revision);
|
||||
}
|
||||
|
||||
/**
|
||||
* API เช็คสถานะโครงสร้างว่าส่งคนไปออกคำสั่งหรือไม่
|
||||
*
|
||||
* @summary API เช็คสถานะโครงสร้างว่าส่งคนไปออกคำสั่งหรือไม่
|
||||
*
|
||||
* @param {string} id Id OrgRevison
|
||||
*/
|
||||
@Get("lock/{id}")
|
||||
async GetById(
|
||||
@Request() request: RequestWithUser,
|
||||
@Path() id: string,
|
||||
) {
|
||||
//add check permission
|
||||
const orgRevision = await this.orgRevisionRepository.findOne({
|
||||
where: { id: id }
|
||||
});
|
||||
if (!orgRevision) {
|
||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลโครงสร้าง");
|
||||
}
|
||||
return new HttpSuccess(orgRevision.isLock);
|
||||
}
|
||||
|
||||
/**
|
||||
* API รายละเอียดโครงสร้าง
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue