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/BaseRaw.js

25 lines
439 B

export class BaseRaw {
constructor(col) {
this.col = col;
}
findOneById(_id, options) {
return this.findOne({ _id }, options);
}
findOne(...args) {
return this.col.findOne(...args);
}
findUsersInRoles() {
throw new Error('overwrite-function', 'You must overwrite this function in the extended classes');
}
find(...args) {
return this.col.find(...args);
}
update(...args) {
return this.col.update(...args);
}
}