From ce0b63fe75ef3c6848597ec3ddcb856e7187a342 Mon Sep 17 00:00:00 2001 From: Chi Vinh Le Date: Wed, 1 Nov 2017 13:29:04 +0100 Subject: [PATCH] Use isStaff instead --- graph/mutators/action.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/graph/mutators/action.js b/graph/mutators/action.js index 50d62225a..93806ced9 100644 --- a/graph/mutators/action.js +++ b/graph/mutators/action.js @@ -35,7 +35,7 @@ const createAction = async ({user = {}, pubsub, loaders: {Comments}}, {item_id, // Set the user as pending if it was a user flag and user has no Admin, Staff or Moderation roles let user = await UsersService.findById(item_id); - if(!user.roles){ + if(!user.isStaff()){ await UsersService.setStatus(item_id, 'PENDING'); } }