summaryrefslogtreecommitdiff
path: root/src/services/products
diff options
context:
space:
mode:
authoreug-vs <eug-vs@keemail.me>2021-03-26 01:56:04 +0300
committereug-vs <eug-vs@keemail.me>2021-03-26 01:56:04 +0300
commitef742ea9b2f246f74eae74169675a331679ad41c (patch)
tree693e92f3e6c2897038875550a12bbc1191b6d5c0 /src/services/products
parent865b41114060765308d560181f4996c0aa7a3e74 (diff)
downloadcommercel-ui-ef742ea9b2f246f74eae74169675a331679ad41c.tar.gz
feat: add strong typing where possible
Diffstat (limited to 'src/services/products')
-rw-r--r--src/services/products/index.ts5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/services/products/index.ts b/src/services/products/index.ts
index c869541..8e09eb2 100644
--- a/src/services/products/index.ts
+++ b/src/services/products/index.ts
@@ -1,7 +1,8 @@
import Form from './ProductForm';
import { ServiceParams } from '../../lib/ServiceContext';
+import { Product } from '../types';
-const service: ServiceParams = {
+const service: ServiceParams<Product> = {
route: 'products',
name: 'Товары',
nameSingular: 'Товар',
@@ -12,7 +13,7 @@ const service: ServiceParams = {
],
default: {
name: '',
- price: '',
+ price: 0,
quantity: 0,
},
Form,