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/ImportData.ts

18 lines
648 B

import { Cursor } from 'mongodb';
import { BaseRaw } from './BaseRaw';
import { IImportRecord, IImportUserRecord, IImportMessageRecord, IImportChannelRecord } from '../../../../definition/IImportRecord';
export class ImportDataRaw extends BaseRaw<IImportRecord> {
getAllUsers(): Cursor<IImportUserRecord> {
return this.find({ dataType: 'user' }) as Cursor<IImportUserRecord>;
}
getAllMessages(): Cursor<IImportMessageRecord> {
return this.find({ dataType: 'message' }) as Cursor<IImportMessageRecord>;
}
getAllChannels(): Cursor<IImportChannelRecord> {
return this.find({ dataType: 'channel' }) as Cursor<IImportChannelRecord>;
}
}