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/app/models/server/raw/LivechatTrigger.ts

16 lines
551 B

import { Cursor, UpdateWriteOpResult } from 'mongodb';
import { BaseRaw, IndexSpecification } from './BaseRaw';
import { ILivechatTrigger } from '../../../../definition/ILivechatTrigger';
export class LivechatTriggerRaw extends BaseRaw<ILivechatTrigger> {
protected indexes: IndexSpecification[] = [{ key: { enabled: 1 } }];
findEnabled(): Cursor<ILivechatTrigger> {
return this.find({ enabled: true });
}
updateById(_id: string, data: ILivechatTrigger): Promise<UpdateWriteOpResult> {
return this.updateOne({ _id }, { $set: data });
}
}