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/tests/data/integration.helper.js

20 lines
537 B

import { api, credentials, request } from './api-data';
export const createIntegration = (integration, userCredentials) => new Promise((resolve) => {
request.post(api('integrations.create'))
.set(userCredentials)
.send(integration)
.end((err, res) => {
resolve(res.body.integration);
});
});
export const removeIntegration = (integrationId, type) => new Promise((resolve) => {
request.post(api('integrations.remove'))
.set(credentials)
.send({
type: `webhook-${ type }`,
integrationId,
})
.end(resolve);
});