update cat-service.js

based on feedback in the community, see also [PR](https://github.wdf.sap.corp/cap/cap.github.wdf.sap.corp/pull/1864)
This commit is contained in:
Iwona Hahn
2020-09-29 17:31:53 +02:00
committed by Christian Georgi
parent ab18c12a69
commit e19447b700

View File

@@ -15,6 +15,8 @@ module.exports = async function (){
// Add some discount for overstocked books
this.after ('READ','Books', each => {
if (each.stock > 111) each.title += ` -- 11% discount!`
if (each.stock > 111) {
each.title += ` -- 11% discount!`
}
})
}