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:
Fabien O'Carroll 2021-06-29 15:06:35 +01:00
parent 4ea7cdc8fe
commit 1fbbdcfc2e

View File

@ -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;