The communications platform that puts data protection first.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Rocket.Chat/apps/meteor/tests/e2e/utils/omnichannel/managers.ts

19 lines
493 B

import type { BaseTest } from '../test';
export const createManager = async (api: BaseTest['api'], username: string) => {
const response = await api.post('/livechat/users/manager', {
username,
});
if (response.status() !== 200) {
throw Error(`Unable to create manager [http status: ${response.status()}]`);
}
const { user: manager } = await response.json();
return {
response,
data: manager,
delete: async () => api.delete(`/livechat/users/manager/${manager._id}`),
};
};