@@ -249,18 +249,18 @@ not been run before makes the assumption that all products have been changed. Th
249249Code within the Stock Management frontend application handles received the POST request as shown:
250250
251251``` javascript
252- router .post (" /subscription/:type" , (req , res ) => {
252+ router .post (' /subscription/:type' , (req , res ) => {
253253 _ .forEach (req .body .data , (item ) => {
254- broadcastEvents (req, item, [" refStore" , " refProduct" , " refShelf" , " type" ]);
254+ broadcastEvents (req, item, [' refStore' , ' refProduct' , ' refShelf' , ' type' ]);
255255 });
256256 res .status (204 ).send ();
257257});
258258
259259function broadcastEvents (req , item , types ) {
260- const message = req .params .type + " received" ;
260+ const message = req .params .type + ' received' ;
261261 _ .forEach (types, (type ) => {
262262 if (item[type]) {
263- req .app .get (" io " ).emit (item[type], message);
263+ req .app .get (' io ' ).emit (item[type], message);
264264 }
265265 });
266266}
@@ -275,8 +275,8 @@ the product prices remain the same - for example apples remain at 0.99€
275275
276276![ ] ( https://fiware.github.io/tutorials.Subscriptions/img/beer-99.png )
277277
278- Let's reduce the price of apples to 0.89€. This can't be done programmatically yet, so it has to be done with
279- a curl command as shown:
278+ Let's reduce the price of apples to 0.89€. This can't be done programmatically yet, so it has to be done with a curl
279+ command as shown:
280280
281281#### :two : Request:
282282
0 commit comments