no message
This commit is contained in:
parent
7aeafcd723
commit
093b2ea73e
2 changed files with 20 additions and 1 deletions
|
|
@ -707,7 +707,7 @@ export class WorkflowController extends Controller {
|
|||
* @summary เช็ค สกจ
|
||||
*
|
||||
*/
|
||||
@Post("keycloak/isofficer/{system}")
|
||||
@Post("keycloak/isofficer")
|
||||
async checkPermissionWorkflow(
|
||||
@Request() req: RequestWithUser,
|
||||
@Body()
|
||||
|
|
|
|||
|
|
@ -180,6 +180,25 @@ class CheckAuth {
|
|||
}
|
||||
});
|
||||
}
|
||||
public async Workflow(req: RequestWithUser, id: string) {
|
||||
if (
|
||||
req.headers.hasOwnProperty("api_key") &&
|
||||
req.headers["api_key"] &&
|
||||
req.headers["api_key"] == process.env.API_KEY
|
||||
) {
|
||||
return null;
|
||||
}
|
||||
return await new CallAPI()
|
||||
.PostData(req, "/org/workflow/keycloak/isofficer", {
|
||||
refId: id,
|
||||
})
|
||||
.then((x) => {
|
||||
return true;
|
||||
})
|
||||
.catch((x) => {
|
||||
return false;
|
||||
});
|
||||
}
|
||||
public async PermissionCreate(req: RequestWithUser, system: string) {
|
||||
return await this.Permission(req, system, "CREATE");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue