mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-05 18:34:39 +03:00
affe6743e5
refs: https://github.com/TryGhost/Team/issues/1145 - this should allow us to remove the /products endpoint in v5 It avoids: - `kg-product-card`, that really is meant to say product - `product-cadence` on offers Co-authored-by: Rishabh <zrishabhgarg@gmail.com>
18 lines
481 B
JavaScript
18 lines
481 B
JavaScript
import ApplicationSerializer from './application';
|
|
|
|
export default class TierSerializer extends ApplicationSerializer {
|
|
serialize() {
|
|
let json = super.serialize(...arguments);
|
|
|
|
if (json?.monthly_price?.amount) {
|
|
json.monthly_price.amount = Math.round(json.monthly_price.amount);
|
|
}
|
|
|
|
if (json?.yearly_price?.amount) {
|
|
json.yearly_price.amount = Math.round(json.yearly_price.amount);
|
|
}
|
|
|
|
return json;
|
|
}
|
|
}
|