mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-03 23:00:14 -05:00
Added "api" source to MemberSubscribedEvents
refs https://github.com/TryGhost/Team/issues/1275 We want to be able to track where member subscriptions came from, so that we can use the information to reduce spam imports of members. We were missing information when members were uploaded via the Admin API, and setting the source to 'member' be default - this fixes that both when creating members and when updating their subscription status.
This commit is contained in:
parent
5652f1169f
commit
cacc74f3b4
1 changed files with 4 additions and 0 deletions
|
@ -151,6 +151,8 @@ module.exports = class MemberRepository {
|
|||
source = 'system';
|
||||
} else if (context.user) {
|
||||
source = 'admin';
|
||||
} else if (context.api_key) {
|
||||
source = 'api';
|
||||
} else {
|
||||
source = 'member';
|
||||
}
|
||||
|
@ -266,6 +268,8 @@ module.exports = class MemberRepository {
|
|||
source = 'system';
|
||||
} else if (context.user) {
|
||||
source = 'admin';
|
||||
} else if (context.api_key) {
|
||||
source = 'api';
|
||||
} else {
|
||||
source = 'member';
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue