mirror of
https://github.com/vale981/Vulcan
synced 2025-03-05 09:31:43 -05:00
Remove/ignore undef/unused vars
This commit is contained in:
parent
1ea5eb8e28
commit
feb3914834
2 changed files with 3 additions and 2 deletions
|
@ -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)');
|
||||
|
|
|
@ -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 [];
|
||||
|
|
Loading…
Add table
Reference in a new issue