diff --git a/init.sql b/init.sql index 14c4e7f..abb228b 100644 --- a/init.sql +++ b/init.sql @@ -34,3 +34,4 @@ CREATE TABLE orders( price BIGINT NOT NULL, order_id UUID REFERENCES orders(id) ); +ALTER TABLE orders ADD CONSTRAINT order_price CHECK(price > 0 AND price < 100); diff --git a/pages/market.html b/pages/market.html index 927cbf8..d5333bc 100644 --- a/pages/market.html +++ b/pages/market.html @@ -80,10 +80,10 @@ {{ else }} {{ end }} - {{ if and (eq .ShareId $.YesShare.Id) (eq .Side "BUY") }} + {{ if and (eq .ShareId $.NoShare.Id) (eq .Side "BUY") }}
- YES + NO {{.Quantity}} @ {{.Price}}
@@ -97,7 +97,7 @@
Order Form -