From e19447b700cf065ed194d23e2b314fb7fb1ef3c8 Mon Sep 17 00:00:00 2001 From: Iwona Hahn Date: Tue, 29 Sep 2020 17:31:53 +0200 Subject: [PATCH] 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) --- bookshop/srv/cat-service.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bookshop/srv/cat-service.js b/bookshop/srv/cat-service.js index 99332859..4352c5e7 100644 --- a/bookshop/srv/cat-service.js +++ b/bookshop/srv/cat-service.js @@ -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!` + } }) }