Merge branch 'master' into asset-graph-api

This commit is contained in:
Kiwi
2017-08-29 21:04:30 +02:00
committed by GitHub
91 changed files with 1757 additions and 1708 deletions
+1 -1
View File
@@ -5,7 +5,7 @@ const {ADD_COMMENT_TAG, REMOVE_COMMENT_TAG} = require('../../perms/constants');
/**
* Modifies the targeted model with the specified operation to add/remove a tag.
*/
const modify = async ({user, loaders: {Tags}, pubsub}, operation, {name, id, item_type, asset_id}) => {
const modify = async ({user, loaders: {Tags}}, operation, {name, id, item_type, asset_id}) => {
// Get the global list of tags from the dataloader.
const tags = await Tags.getAll.load({id, item_type, asset_id});
+3 -3
View File
@@ -2,7 +2,7 @@ const errors = require('../../errors');
const UsersService = require('../../services/users');
const {SET_USER_STATUS, SUSPEND_USER, REJECT_USERNAME} = require('../../perms/constants');
const setUserStatus = async ({user, pubsub}, {id, status}) => {
const setUserStatus = async ({pubsub}, {id, status}) => {
const result = await UsersService.setStatus(id, status);
if (result && result.status === 'BANNED') {
pubsub.publish('userBanned', result);
@@ -10,7 +10,7 @@ const setUserStatus = async ({user, pubsub}, {id, status}) => {
return result;
};
const suspendUser = async ({user, pubsub}, {id, message, until}) => {
const suspendUser = async ({pubsub}, {id, message, until}) => {
const result = await UsersService.suspendUser(id, message, until);
if (result) {
pubsub.publish('userSuspended', result);
@@ -18,7 +18,7 @@ const suspendUser = async ({user, pubsub}, {id, message, until}) => {
return result;
};
const rejectUsername = async ({user, pubsub}, {id, message}) => {
const rejectUsername = async ({pubsub}, {id, message}) => {
const result = await UsersService.rejectUsername(id, message);
if (result) {
pubsub.publish('usernameRejected', result);