From 3eb4d2c341b712268bd321173909e0a7b19a88c9 Mon Sep 17 00:00:00 2001 From: Justin Reynolds Date: Fri, 28 Jun 2019 12:52:09 -0500 Subject: Prettier & eslint project style update --- models/watchable.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'models/watchable.js') diff --git a/models/watchable.js b/models/watchable.js index 6821f847..7dbacb59 100644 --- a/models/watchable.js +++ b/models/watchable.js @@ -1,5 +1,5 @@ // simple version, only toggle watch / unwatch -const simpleWatchable = (collection) => { +const simpleWatchable = collection => { collection.attachSchema({ watchers: { type: [String], @@ -24,8 +24,8 @@ const simpleWatchable = (collection) => { collection.mutations({ setWatcher(userId, level) { // if level undefined or null or false, then remove - if (!level) return { $pull: { watchers: userId }}; - return { $addToSet: { watchers: userId }}; + if (!level) return { $pull: { watchers: userId } }; + return { $addToSet: { watchers: userId } }; }, }); }; @@ -34,7 +34,7 @@ const simpleWatchable = (collection) => { const complexWatchOptions = ['watching', 'tracking', 'muted']; const complexWatchDefault = 'muted'; -const complexWatchable = (collection) => { +const complexWatchable = collection => { collection.attachSchema({ 'watchers.$.userId': { type: String, @@ -72,9 +72,9 @@ const complexWatchable = (collection) => { setWatcher(userId, level) { // if level undefined or null or false, then remove if (level === complexWatchDefault) level = null; - if (!level) return { $pull: { watchers: { userId }}}; + if (!level) return { $pull: { watchers: { userId } } }; const index = this.watcherIndex(userId); - if (index<0) return { $push: { watchers: { userId, level }}}; + if (index < 0) return { $push: { watchers: { userId, level } } }; return { $set: { [`watchers.${index}.level`]: level, -- cgit v1.2.3-1-g7c22