Remove/ignore undef/unused vars

This commit is contained in:
Luca Hagel 2018-01-29 03:55:57 +01:00
parent 1ea5eb8e28
commit feb3914834
2 changed files with 3 additions and 2 deletions

View file

@ -11,7 +11,6 @@ import sanitizeHtml from 'sanitize-html';
import getSlug from 'speakingurl';
import { getSetting, registerSetting } from './settings.js';
import { Routes } from './routes.js';
import { isAbsolute } from 'path';
import { getCollection } from './collections.js';
registerSetting('debug', false, 'Enable debug mode (more verbose logging)');

View file

@ -73,9 +73,11 @@ export const makeVoteable = collection => {
viewableBy: ['guests'],
resolveAs: {
type: '[User]',
resolver: async (document, args, {currentUser, Users}) => {
resolver: async (document, args, { currentUser, Users }) => {
// eslint-disable-next-line no-undef
const votes = Votes.find({itemId: document._id}).fetch();
const votersIds = _.pluck(votes, 'userId');
// eslint-disable-next-line no-undef
const voters = Users.find({_id: {$in: votersIds}});
return voters;
// if (!document.upvoters) return [];