From e5ee97beceae805c7df1c6e5170b7bb28388bdc8 Mon Sep 17 00:00:00 2001 From: Brandon Hops Date: Tue, 1 Dec 2015 23:28:36 -0800 Subject: [PATCH] Remove undefined function and fix some comments --- core/server/api/settings.js | 2 +- core/server/middleware/index.js | 1 - core/server/models/role.js | 2 +- core/server/models/user.js | 2 +- 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/core/server/api/settings.js b/core/server/api/settings.js index 94aa2b65b3..ad1e21439c 100644 --- a/core/server/api/settings.js +++ b/core/server/api/settings.js @@ -357,7 +357,7 @@ settings = { /** * ### Edit - * Update properties of a post + * Update properties of a setting * @param {{settings: }} object Setting or a single string name * @param {{id (required), include,...}} options (optional) or a single string value * @return {Promise(Setting)} Edited Setting diff --git a/core/server/middleware/index.js b/core/server/middleware/index.js index 152aced0c8..a34aebf8ac 100644 --- a/core/server/middleware/index.js +++ b/core/server/middleware/index.js @@ -43,7 +43,6 @@ middleware = { authenticateUser: auth.authenticateUser, requiresAuthorizedUser: auth.requiresAuthorizedUser, requiresAuthorizedUserPublicAPI: auth.requiresAuthorizedUserPublicAPI, - generateAccessToken: auth.generateAccessToken, errorHandler: errors.handleAPIError } }; diff --git a/core/server/models/role.js b/core/server/models/role.js index f4c19915cb..bb0ab9085e 100644 --- a/core/server/models/role.js +++ b/core/server/models/role.js @@ -49,7 +49,7 @@ Role = ghostBookshelf.Model.extend({ if (_.isNumber(roleModelOrId) || _.isString(roleModelOrId)) { // Grab the original args without the first one origArgs = _.toArray(arguments).slice(1); - // Get the actual post model + // Get the actual role model return this.findOne({id: roleModelOrId, status: 'all'}).then(function then(foundRoleModel) { // Build up the original args but substitute with actual model var newArgs = [foundRoleModel].concat(origArgs); diff --git a/core/server/models/user.js b/core/server/models/user.js index e5ca0d95a8..33e4383fef 100644 --- a/core/server/models/user.js +++ b/core/server/models/user.js @@ -445,7 +445,7 @@ User = ghostBookshelf.Model.extend({ if (_.isNumber(userModelOrId) || _.isString(userModelOrId)) { // Grab the original args without the first one origArgs = _.toArray(arguments).slice(1); - // Get the actual post model + // Get the actual user model return this.findOne({id: userModelOrId, status: 'all'}, {include: ['roles']}).then(function then(foundUserModel) { // Build up the original args but substitute with actual model var newArgs = [foundUserModel].concat(origArgs);