no message
This commit is contained in:
parent
458fb90187
commit
a425fb4848
1 changed files with 80 additions and 62 deletions
|
|
@ -254,6 +254,26 @@ export class PermissionController extends Controller {
|
||||||
return new HttpSuccess(res);
|
return new HttpSuccess(res);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* API permission (dotnet api)
|
||||||
|
* @summary permission (dotnet api)
|
||||||
|
* @param {string} action action
|
||||||
|
* @param {string} system authSysId
|
||||||
|
*/
|
||||||
|
@Get("dotnet-org/{action}/{system}/{profileId}")
|
||||||
|
public async dotnetOrg(
|
||||||
|
@Request() req: RequestWithUser,
|
||||||
|
@Path() action: string,
|
||||||
|
@Path() system: string,
|
||||||
|
) {
|
||||||
|
if (!["CREATE", "DELETE", "GET", "LIST", "UPDATE"].includes(action)) {
|
||||||
|
throw new HttpError(HttpStatus.NOT_FOUND, "Action ไม่ถูกต้อง");
|
||||||
|
}
|
||||||
|
|
||||||
|
let res = await new permission().PermissionOrg(req, system.toLocaleUpperCase(), action);
|
||||||
|
return new HttpSuccess(res);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* API permission (dotnet api)
|
* API permission (dotnet api)
|
||||||
* @summary permission (dotnet api)
|
* @summary permission (dotnet api)
|
||||||
|
|
@ -743,9 +763,7 @@ export class PermissionController extends Controller {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Get("checkOrg/{keycloakId}")
|
@Get("checkOrg/{keycloakId}")
|
||||||
public async checkOrg(
|
public async checkOrg(@Path() keycloakId: string) {
|
||||||
@Path() keycloakId: string,
|
|
||||||
) {
|
|
||||||
const redisClient = await this.redis.createClient({
|
const redisClient = await this.redis.createClient({
|
||||||
host: REDIS_HOST,
|
host: REDIS_HOST,
|
||||||
port: REDIS_PORT,
|
port: REDIS_PORT,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue