0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-10 23:36:14 -05:00

Renamed reset_all_passwords Authentication API endpoint to /global_password_reset

refs https://github.com/TryGhost/Toolbox/issues/308

- our API has a pattern of using nouns and not verbs for the endpoint
  names, so this changes the endpoint for v5
This commit is contained in:
Daniel Lockyer 2022-04-25 17:34:00 +01:00
parent cfa2f0e102
commit ea3c927d94
No known key found for this signature in database
GPG key ID: D21186F0B47295AD
2 changed files with 2 additions and 2 deletions

View file

@ -229,7 +229,7 @@ module.exports = function apiRoutes() {
router.post('/authentication/setup', http(api.authentication.setup));
router.put('/authentication/setup', mw.authAdminApi, http(api.authentication.updateSetup));
router.get('/authentication/setup', http(api.authentication.isSetup));
router.post('/authentication/reset_all_passwords', mw.authAdminApi, http(api.authentication.resetAllPasswords));
router.post('/authentication/global_password_reset', mw.authAdminApi, http(api.authentication.resetAllPasswords));
// ## Images
router.post('/images/upload',

View file

@ -479,7 +479,7 @@ describe('Authentication API', function () {
});
it('reset all passwords returns 204', async function () {
await agent.post('authentication/reset_all_passwords')
await agent.post('authentication/global_password_reset')
.header('Accept', 'application/json')
.body({})
.expectStatus(204)