0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00

Included description in Admin Products API output

refs https://github.com/TryGhost/Ghost/issues/12055
refs https://github.com/TryGhost/Ghost/commit/b4d9ee0b

Since we've added the description column to the products table we need
to include it in responses from the API
This commit is contained in:
Fabien O'Carroll 2021-05-04 13:42:35 +01:00
parent b4d9ee0b4e
commit da33a4ee65

View file

@ -38,7 +38,7 @@ function singleProduct(model, _apiConfig, frame) {
}
/**
* @param {import('bookshelf').Model} member
* @param {import('bookshelf').Model} product
* @param {object} options
*
* @returns {SerializedProduct}
@ -49,6 +49,7 @@ function serializeProduct(product, options) {
return {
id: json.id,
name: json.name,
description: json.description,
slug: json.slug,
created_at: json.created_at,
updated_at: json.updated_at,
@ -77,6 +78,10 @@ function createSerializer(debugString, serialize) {
* @prop {string} id
* @prop {string} name
* @prop {string} slug
* @prop {string} description
* @prop {Date} created_at
* @prop {Date} updated_at
* @prop {any} stripe_prices
*/
/**