mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-25 03:44:29 +03:00
Updated unsubscribe copy
This commit is contained in:
parent
7209abb729
commit
4790e64256
@ -38,7 +38,7 @@
|
||||
<section class="gh-flow-content gh-flow-content-unsubscribe">
|
||||
<p>
|
||||
{{#if error}}
|
||||
Uh oh! Unsubscribe failed: "{{error}}"
|
||||
{{error}}
|
||||
{{else}}
|
||||
{{#if member}}<span class="gh-flow-em">{{member.email}}</span> has been successfully unsubscribed{{/if}}
|
||||
{{/if}}
|
||||
|
@ -151,14 +151,14 @@ function createUnsubscribeUrl(member) {
|
||||
async function handleUnsubscribeRequest(req) {
|
||||
if (!req.url) {
|
||||
throw new common.errors.BadRequestError({
|
||||
message: 'Expected unsubscribe param containing token'
|
||||
message: 'Unsubscribe failed! Could not find member'
|
||||
});
|
||||
}
|
||||
|
||||
const {query} = url.parse(req.url, true);
|
||||
if (!query || !query.uuid) {
|
||||
throw new common.errors.BadRequestError({
|
||||
message: 'Expected unsubscribe param containing token'
|
||||
message: (query.preview ? 'Unsubscribe preview' : 'Unsubscribe failed! Could not find member')
|
||||
});
|
||||
}
|
||||
|
||||
@ -168,7 +168,7 @@ async function handleUnsubscribeRequest(req) {
|
||||
|
||||
if (!member) {
|
||||
throw new common.errors.BadRequestError({
|
||||
message: 'Expected valid subscribe param - could not find member'
|
||||
message: 'Unsubscribe failed! Could not find member'
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user