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

26 lines
594 B

import type { Db, DeleteResult, Filter, IndexDescription } from 'mongodb';
import type { IAppsPersistenceModel } from '@rocket.chat/model-typings';
import { BaseRaw } from './BaseRaw';
export class AppsPersistenceModel extends BaseRaw<any> implements IAppsPersistenceModel {
constructor(db: Db) {
super(db, 'apps_persistence');
}
protected modelIndexes(): IndexDescription[] {
return [
{
key: {
appId: 1,
associations: 1,
},
},
];
}
// Bypass trash collection
remove(query: Filter<any>): Promise<DeleteResult> {
return this.col.deleteMany(query);
}
}