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/data/subscriptions.ts

15 lines
542 B

import type { ISubscription } from "@rocket.chat/core-typings";
import { api, credentials, request } from "./api-data";
export const getSubscriptionForRoom = async (roomId: string, overrideCredential?: { 'X-Auth-Token': string; 'X-User-Id': string; }): Promise<ISubscription> => {
const response = await request
.get(api('subscriptions.getOne'))
.set(overrideCredential || credentials)
.query({ roomId })
.expect('Content-Type', 'application/json')
.expect(200);
const { subscription } = response.body;
return subscription;
}