0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-06 22:40:14 -05:00

Remove undefined function and fix some comments

This commit is contained in:
Brandon Hops 2015-12-01 23:28:36 -08:00
parent 7ebc7f7ff1
commit e5ee97bece
4 changed files with 3 additions and 4 deletions

View file

@ -357,7 +357,7 @@ settings = {
/** /**
* ### Edit * ### Edit
* Update properties of a post * Update properties of a setting
* @param {{settings: }} object Setting or a single string name * @param {{settings: }} object Setting or a single string name
* @param {{id (required), include,...}} options (optional) or a single string value * @param {{id (required), include,...}} options (optional) or a single string value
* @return {Promise(Setting)} Edited Setting * @return {Promise(Setting)} Edited Setting

View file

@ -43,7 +43,6 @@ middleware = {
authenticateUser: auth.authenticateUser, authenticateUser: auth.authenticateUser,
requiresAuthorizedUser: auth.requiresAuthorizedUser, requiresAuthorizedUser: auth.requiresAuthorizedUser,
requiresAuthorizedUserPublicAPI: auth.requiresAuthorizedUserPublicAPI, requiresAuthorizedUserPublicAPI: auth.requiresAuthorizedUserPublicAPI,
generateAccessToken: auth.generateAccessToken,
errorHandler: errors.handleAPIError errorHandler: errors.handleAPIError
} }
}; };

View file

@ -49,7 +49,7 @@ Role = ghostBookshelf.Model.extend({
if (_.isNumber(roleModelOrId) || _.isString(roleModelOrId)) { if (_.isNumber(roleModelOrId) || _.isString(roleModelOrId)) {
// Grab the original args without the first one // Grab the original args without the first one
origArgs = _.toArray(arguments).slice(1); 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) { return this.findOne({id: roleModelOrId, status: 'all'}).then(function then(foundRoleModel) {
// Build up the original args but substitute with actual model // Build up the original args but substitute with actual model
var newArgs = [foundRoleModel].concat(origArgs); var newArgs = [foundRoleModel].concat(origArgs);

View file

@ -445,7 +445,7 @@ User = ghostBookshelf.Model.extend({
if (_.isNumber(userModelOrId) || _.isString(userModelOrId)) { if (_.isNumber(userModelOrId) || _.isString(userModelOrId)) {
// Grab the original args without the first one // Grab the original args without the first one
origArgs = _.toArray(arguments).slice(1); 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) { return this.findOne({id: userModelOrId, status: 'all'}, {include: ['roles']}).then(function then(foundUserModel) {
// Build up the original args but substitute with actual model // Build up the original args but substitute with actual model
var newArgs = [foundUserModel].concat(origArgs); var newArgs = [foundUserModel].concat(origArgs);