gateway: format webchat authz error
This commit is contained in:
parent
5fa7d31d87
commit
dfcd7b6542
@ -114,7 +114,10 @@ function authorizeGatewayMethod(method: string, client: GatewayRequestOptions["c
|
|||||||
|
|
||||||
if (role === "webchat") {
|
if (role === "webchat") {
|
||||||
if (WEBCHAT_ROLE_METHODS.has(method)) return null;
|
if (WEBCHAT_ROLE_METHODS.has(method)) return null;
|
||||||
return errorShape(ErrorCodes.INVALID_REQUEST, `unauthorized method for role webchat: ${method}`);
|
return errorShape(
|
||||||
|
ErrorCodes.INVALID_REQUEST,
|
||||||
|
`unauthorized method for role webchat: ${method}`,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (role !== "operator") {
|
if (role !== "operator") {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user