update views + reduced providers in main app
[outofuni/tavern2.git] / lib / product_service.dart
index 0ffe964..218b169 100644 (file)
@@ -57,7 +57,7 @@ class ProductService {
                }
        }
 
                }
        }
 
-       Future<Null> createProduct(String name,double price,String cat) async {
+       Future<String> createProduct(String name,double pri,String cat) async {
                try {
                        var url=_server+'/'+_db;
                        var response = await _http.post(
                try {
                        var url=_server+'/'+_db;
                        var response = await _http.post(
@@ -65,7 +65,7 @@ class ProductService {
                                headers: {'Content-Type': 'application/json'},
                                body: JSON.encode({
                                        'name': name,
                                headers: {'Content-Type': 'application/json'},
                                body: JSON.encode({
                                        'name': name,
-                                       'price': price,
+                                       'price': pri,
                                        'type': 'product',
                                        'category': cat
                                })
                                        'type': 'product',
                                        'category': cat
                                })