mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-10 23:36:14 -05:00
Removed unused data from members identity data
refs https://github.com/TryGhost/Team/issues/909 The member identity data currently attaches several extra data points to member information which is not used/needed, and causes multiple DB queries on each page load when Portal requests for member via `/members/api/member` endpoint. This change removes all the unused data points on member - `labels`, `stripe_customer`, products`, `stripe_product` cutting DB queries in half.
This commit is contained in:
parent
7acc7bcb3d
commit
3e13a6c562
1 changed files with 1 additions and 6 deletions
|
@ -269,12 +269,7 @@ module.exports = function MembersAPI({
|
||||||
const model = await users.get({email}, {
|
const model = await users.get({email}, {
|
||||||
withRelated: [
|
withRelated: [
|
||||||
'stripeSubscriptions',
|
'stripeSubscriptions',
|
||||||
'stripeSubscriptions.customer',
|
'stripeSubscriptions.stripePrice'
|
||||||
'stripeSubscriptions.stripePrice',
|
|
||||||
'stripeSubscriptions.stripePrice.stripeProduct',
|
|
||||||
'stripeSubscriptions.stripePrice.stripeProduct.product',
|
|
||||||
'labels',
|
|
||||||
'products'
|
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
if (!model) {
|
if (!model) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue