mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-03 23:00:14 -05:00
Renamed /passwordreset
Authentication API endpoint to /password_reset
refs https://github.com/TryGhost/Toolbox/issues/308 - we have the pattern of splitting words in API endpoints with an underscore but this was an exception we want to clean up in v5
This commit is contained in:
parent
8473298072
commit
c4f3d44baa
2 changed files with 7 additions and 7 deletions
|
@ -218,12 +218,12 @@ module.exports = function apiRoutes() {
|
|||
router.get('/identities', mw.authAdminApi, http(api.identities.read));
|
||||
|
||||
// ## Authentication
|
||||
router.post('/authentication/passwordreset',
|
||||
router.post('/authentication/password_reset',
|
||||
shared.middleware.brute.globalReset,
|
||||
shared.middleware.brute.userReset,
|
||||
http(api.authentication.generateResetToken)
|
||||
);
|
||||
router.put('/authentication/passwordreset', shared.middleware.brute.globalBlock, http(api.authentication.resetPassword));
|
||||
router.put('/authentication/password_reset', shared.middleware.brute.globalBlock, http(api.authentication.resetPassword));
|
||||
router.post('/authentication/invitation', http(api.authentication.acceptInvitation));
|
||||
router.get('/authentication/invitation', http(api.authentication.isInvitation));
|
||||
router.post('/authentication/setup', http(api.authentication.setup));
|
||||
|
|
|
@ -347,7 +347,7 @@ describe('Authentication API', function () {
|
|||
password: ownerUser.get('password')
|
||||
});
|
||||
|
||||
await agent.put('authentication/passwordreset')
|
||||
await agent.put('authentication/password_reset')
|
||||
.header('Accept', 'application/json')
|
||||
.body({
|
||||
passwordreset: [{
|
||||
|
@ -365,7 +365,7 @@ describe('Authentication API', function () {
|
|||
|
||||
it('reset password: invalid token', async function () {
|
||||
await agent
|
||||
.put('authentication/passwordreset')
|
||||
.put('authentication/password_reset')
|
||||
.header('Accept', 'application/json')
|
||||
.body({
|
||||
passwordreset: [{
|
||||
|
@ -397,7 +397,7 @@ describe('Authentication API', function () {
|
|||
});
|
||||
|
||||
await agent
|
||||
.put('authentication/passwordreset')
|
||||
.put('authentication/password_reset')
|
||||
.header('Accept', 'application/json')
|
||||
.body({
|
||||
passwordreset: [{
|
||||
|
@ -426,7 +426,7 @@ describe('Authentication API', function () {
|
|||
});
|
||||
|
||||
await agent
|
||||
.put('authentication/passwordreset')
|
||||
.put('authentication/password_reset')
|
||||
.header('Accept', 'application/json')
|
||||
.body({
|
||||
passwordreset: [{
|
||||
|
@ -448,7 +448,7 @@ describe('Authentication API', function () {
|
|||
|
||||
it('reset password: generate reset token', async function () {
|
||||
await agent
|
||||
.post('authentication/passwordreset')
|
||||
.post('authentication/password_reset')
|
||||
.header('Accept', 'application/json')
|
||||
.body({
|
||||
passwordreset: [{
|
||||
|
|
Loading…
Add table
Reference in a new issue