mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-24 23:48:13 -05:00
Removed duplicate usage of importer
source
no issue
- Setting a dedicated source for imported members was already done with 455778662c
- This unifies the same source but keeps the usage of context setting on init alive
This commit is contained in:
parent
7af0eb6fdf
commit
376db4d085
1 changed files with 2 additions and 4 deletions
|
@ -238,14 +238,12 @@ module.exports = class MemberRepository {
|
|||
const context = options && options.context || {};
|
||||
let source;
|
||||
|
||||
if (context.import) {
|
||||
if (context.import || context.importer) {
|
||||
source = 'import';
|
||||
} else if (context.internal) {
|
||||
source = 'system';
|
||||
} else if (context.user) {
|
||||
source = 'admin';
|
||||
} else if (context.importer) {
|
||||
source = 'importer';
|
||||
} else if (context.api_key) {
|
||||
source = 'api';
|
||||
} else {
|
||||
|
@ -414,7 +412,7 @@ module.exports = class MemberRepository {
|
|||
memberData.newsletters = await this.getSubscribeOnSignupNewsletters(browseOptions);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (memberData.newsletters) {
|
||||
const existingNewsletterIds = existingNewsletters.map(newsletter => newsletter.id);
|
||||
const incomingNewsletterIds = memberData.newsletters.map(newsletter => newsletter.id);
|
||||
|
|
Loading…
Add table
Reference in a new issue