import TranslitDbUploads from '../../collections/translitdbuploads.js';
import { Meteor } from 'meteor/meteor';
import { Logger } from 'meteor/ostrio:logger';
import { LoggerFile } from 'meteor/ostrio:loggerfile';

var log = new Logger();
(new LoggerFile(log)).enable();
Meteor.publish('translitdbuploads', function() {
    if (!this.userId)
        return [];
    Meteor.settings.enableDebug ? log.debug(`translitdbuploadsPublisher => start publish translitdbuploads `, {}, Meteor.user().username) : '';
    return TranslitDbUploads.find({ userId: this.userId }).cursor;
});