Added fix for not logged in user

This commit is contained in:
Wyatt Johnson
2017-02-10 11:00:12 -07:00
parent 27ea409e31
commit 2c2541e7be
3 changed files with 5 additions and 3 deletions
+1
View File
@@ -121,6 +121,7 @@ const ErrInvalidAssetURL = new APIError('asset_url is invalid', {
// ErrNotAuthorized is an error that is returned in the event an operation is
// deemed not authorized.
const ErrNotAuthorized = new APIError('not authorized', {
translation_key: 'NOT_AUTHORIZED',
status: 401
});
+3 -2
View File
@@ -1,6 +1,7 @@
const ActionModel = require('../../models/action');
const ActionsService = require('../../services/actions');
const UsersService = require('../../services/users');
const errors = require('../../errors');
/**
* Creates an action on a item. If the item is a user flag, sets the user's status to
@@ -59,8 +60,8 @@ module.exports = (context) => {
return {
Action: {
create: () => {},
delete: () => {}
create: () => Promise.reject(errors.ErrNotAuthorized),
delete: () => Promise.reject(errors.ErrNotAuthorized)
}
};
};
+1 -1
View File
@@ -171,7 +171,7 @@ module.exports = (context) => {
return {
Comment: {
create: () => {}
create: () => Promise.reject(errors.ErrNotAuthorized)
}
};
};