Included benefits with products when writing
refs https://github.com/TryGhost/Team/issues/806 This allows API consumers to not need to pass an `includes` for benefits when creating or updating products.
This commit is contained in:
parent
4ea7cdc8fe
commit
1fbbdcfc2e
@ -211,6 +211,7 @@ class ProductRepository {
|
||||
await product.related('stripePrices').fetch(options);
|
||||
await product.related('monthlyPrice').fetch(options);
|
||||
await product.related('yearlyPrice').fetch(options);
|
||||
await product.related('benefits').fetch(options);
|
||||
}
|
||||
|
||||
return product;
|
||||
@ -450,6 +451,7 @@ class ProductRepository {
|
||||
await product.related('stripePrices').fetch(options);
|
||||
await product.related('monthlyPrice').fetch(options);
|
||||
await product.related('yearlyPrice').fetch(options);
|
||||
await product.related('benefits').fetch(options);
|
||||
}
|
||||
|
||||
return product;
|
||||
|
Loading…
Reference in New Issue
Block a user