Chore: Migrate REST API - getRoutingConfig to Typescript (#3794)
* Chore: Migrate REST API - getRoutingConfig to Typescript * minor tweak
This commit is contained in:
parent
1c5f8b1731
commit
0521c291f2
|
@ -428,7 +428,15 @@ export const usersAutoComplete = (selector: any) =>
|
||||||
// RC 2.4.0
|
// RC 2.4.0
|
||||||
sdk.get('users.autocomplete', { selector });
|
sdk.get('users.autocomplete', { selector });
|
||||||
|
|
||||||
export const getRoutingConfig = () =>
|
export const getRoutingConfig = (): Promise<{
|
||||||
|
previewRoom: boolean;
|
||||||
|
showConnecting: boolean;
|
||||||
|
showQueue: boolean;
|
||||||
|
showQueueLink: boolean;
|
||||||
|
returnQueue: boolean;
|
||||||
|
enableTriggerAction: boolean;
|
||||||
|
autoAssignAgent: boolean;
|
||||||
|
}> =>
|
||||||
// RC 2.0.0
|
// RC 2.0.0
|
||||||
sdk.methodCallWrapper('livechat:getRoutingConfig');
|
sdk.methodCallWrapper('livechat:getRoutingConfig');
|
||||||
|
|
||||||
|
|
|
@ -347,7 +347,7 @@ class RoomActionsView extends React.Component<IRoomActionsViewProps, IRoomAction
|
||||||
const { returnQueue } = await RocketChat.getRoutingConfig();
|
const { returnQueue } = await RocketChat.getRoutingConfig();
|
||||||
return returnQueue;
|
return returnQueue;
|
||||||
} catch {
|
} catch {
|
||||||
// do nothing
|
return false;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue