mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-10 23:36:14 -05:00
Updated create & update to accept products
refs https://github.com/TryGhost/Team/issues/748 This allows us to start modifying products directly in order to give complimentary access without using Stripe
This commit is contained in:
parent
f6e12a3da7
commit
11067c4b08
1 changed files with 3 additions and 2 deletions
|
@ -68,7 +68,7 @@ module.exports = class MemberRepository {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const memberData = _.pick(data, ['email', 'name', 'note', 'subscribed', 'geolocation', 'created_at']);
|
const memberData = _.pick(data, ['email', 'name', 'note', 'subscribed', 'geolocation', 'created_at', 'products']);
|
||||||
|
|
||||||
const member = await this._Member.add({
|
const member = await this._Member.add({
|
||||||
...memberData,
|
...memberData,
|
||||||
|
@ -110,7 +110,8 @@ module.exports = class MemberRepository {
|
||||||
'note',
|
'note',
|
||||||
'subscribed',
|
'subscribed',
|
||||||
'labels',
|
'labels',
|
||||||
'geolocation'
|
'geolocation',
|
||||||
|
'products'
|
||||||
]), options);
|
]), options);
|
||||||
|
|
||||||
// member._changed.subscribed has a value if the `subscribed` attribute is passed in the update call, regardless of the previous value
|
// member._changed.subscribed has a value if the `subscribed` attribute is passed in the update call, regardless of the previous value
|
||||||
|
|
Loading…
Add table
Reference in a new issue