Updated newsletter email verification endpoint

refs https://github.com/TryGhost/Ghost/pull/14491

- API endpoint used when completing verification of a newsletter email change has moved to `PUT /newsletters/verifications/` to follow our API patterns
This commit is contained in:
Kevin Ansfield 2022-04-19 18:06:56 +01:00
parent 0ca9f32d36
commit 86a69ece65
2 changed files with 2 additions and 2 deletions

View File

@ -28,7 +28,7 @@ export default class VerifyNewsletterEmail extends Component {
@task
*verifyEmailTask(token) {
try {
const url = this.ghostPaths.url.api('newsletters', 'verify-email');
const url = this.ghostPaths.url.api('newsletters', 'verifications');
const response = yield this.ajax.put(url, {data: {token}});

View File

@ -64,7 +64,7 @@ export default function mockNewsletters(server) {
});
// verify email update
server.put('/newsletters/verify-email/', function ({newsletters}, request) {
server.put('/newsletters/verifications/', function ({newsletters}, request) {
const requestBody = JSON.parse(request.requestBody);
const tokenData = JSON.parse(atob(requestBody.token));