Skip to content

Commit 57d2521

Browse files
committed
codequality fixes
1 parent 9fbbd7a commit 57d2521

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

frontend/src/components/ProductCard.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<li class="product-card">
3-
<img :src="'/' + product.img">
3+
<img :src="'/' + product.img" alt="product image">
44
<div class="product-details">
55
<div class="title">{{product.product_code}}</div>
66
<div class="notes">{{product.roasting_notes}}</div>

services/cls_Sample/ICO/Handler.cls

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
/// REST services for managing the coffee business
22
Class ICO.Handler Extends %CSP.REST
33
{
4+
45
/// Honor the CORS header <a href="https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls?KEY=GREST_CORS">as described here</a>
56
Parameter HandleCorsRequest = 1;
7+
68
/// Default response content type
79
Parameter CONTENTTYPE = "application/json";
10+
811
/// Number of days since roasting for the coffee to be considered "stale"
912
Parameter MAXAGE = 5;
1013

@@ -37,7 +40,7 @@ ClassMethod SellProduct(id As %String, quantity As %Numeric) As %Status
3740
set item.quantity = (item.quantity - quantity)
3841
do item.%JSONExportToString(.outstring)
3942
write outstring
40-
set sc = item.%Save()
43+
do item.%Save()
4144
}
4245
}
4346
} catch (oException) {
@@ -131,7 +134,7 @@ ClassMethod CatalogProduct() As %Status
131134
set catobj.timeroasted = obj."time_roasted"
132135
set catobj.roastingnotes = obj."roasting_notes"
133136
set catobj.img = obj."img"
134-
set sc = catobj.%Save()
137+
do catobj.%Save()
135138
set resp = {}
136139
set resp."success" = 1
137140
write resp.%ToJSON()
@@ -171,7 +174,7 @@ ClassMethod GetRawBeans(id As %String, quantity As %Numeric) As %Status
171174
{
172175
// decrement the quantity and return the requested inventory
173176
set item.quantitykg = (item.quantitykg - quantity)
174-
set sc = item.%Save()
177+
do item.%Save()
175178
do item.%JSONExportToString(.outstring)
176179
write outstring
177180
}

0 commit comments

Comments
 (0)