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:
parent
7ebc7f7ff1
commit
e5ee97bece
4 changed files with 3 additions and 4 deletions
|
@ -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
|
||||
|
|
|
@ -43,7 +43,6 @@ middleware = {
|
|||
authenticateUser: auth.authenticateUser,
|
||||
requiresAuthorizedUser: auth.requiresAuthorizedUser,
|
||||
requiresAuthorizedUserPublicAPI: auth.requiresAuthorizedUserPublicAPI,
|
||||
generateAccessToken: auth.generateAccessToken,
|
||||
errorHandler: errors.handleAPIError
|
||||
}
|
||||
};
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue