mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-24 06:35:49 +03:00
Switched members services to use v4 API
refs https://github.com/TryGhost/Team/issues/513 - Bumping version as this is now the latest stable API. - The change might cause this particular side effect (acceptable for major version): if a member requests a login URL when the instance is on 3.x version and site owner upgrades do 4.x before member authenticates through login link, the login will fail and the member will have to request a new login URL.
This commit is contained in:
parent
e2f997d43b
commit
b17a965c88
@ -216,7 +216,7 @@ class MembersConfigProvider {
|
||||
|
||||
getTokenConfig() {
|
||||
const {href: membersApiUrl} = new URL(
|
||||
this._urlUtils.getApiPath({version: 'v3', type: 'members'}),
|
||||
this._urlUtils.getApiPath({version: 'v4', type: 'members'}),
|
||||
this._urlUtils.urlFor('admin', true)
|
||||
);
|
||||
|
||||
|
@ -52,7 +52,7 @@ function createSettingsInstance(config) {
|
||||
return updateEmailTemplate({url, email, siteTitle});
|
||||
},
|
||||
getSigninURL(token, type) {
|
||||
const signinURL = new URL(getApiUrl({version: 'v3', type: 'admin'}));
|
||||
const signinURL = new URL(getApiUrl({version: 'v4', type: 'admin'}));
|
||||
signinURL.pathname = path.join(signinURL.pathname, '/settings/members/email/');
|
||||
signinURL.searchParams.set('token', token);
|
||||
signinURL.searchParams.set('action', type);
|
||||
|
Loading…
Reference in New Issue
Block a user