Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added missing validator to updateSetup method
- This is the code corresponding to processArgs function in v1 authentication.updateSetup method
- Loading branch information
Showing
2 changed files
with
16 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
const debug = require('ghost-ignition').debug('api:v2:utils:validators:input:updateSetup'); | ||
const common = require('../../../../../lib/common'); | ||
|
||
module.exports = { | ||
updateSetup(apiConfig, frame) { | ||
debug('resetPassword'); | ||
|
||
if (!frame.options.context || !frame.options.context.user) { | ||
throw new common.errors.NoPermissionError({message: common.i18n.t('errors.api.authentication.notTheBlogOwner')}); | ||
} | ||
} | ||
}; |