0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-03 23:00: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:
Rishabh 2021-07-22 12:28:39 +05:30
parent 7acc7bcb3d
commit 3e13a6c562

View file

@ -269,12 +269,7 @@ module.exports = function MembersAPI({
const model = await users.get({email}, {
withRelated: [
'stripeSubscriptions',
'stripeSubscriptions.customer',
'stripeSubscriptions.stripePrice',
'stripeSubscriptions.stripePrice.stripeProduct',
'stripeSubscriptions.stripePrice.stripeProduct.product',
'labels',
'products'
'stripeSubscriptions.stripePrice'
]
});
if (!model) {