projects
/
outofuni
/
tavern2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
update views + reduced providers in main app
[outofuni/tavern2.git]
/
lib
/
product_category_service.dart
diff --git
a/lib/product_category_service.dart
b/lib/product_category_service.dart
index
f246a71
..
0d2830d
100644
(file)
--- a/
lib/product_category_service.dart
+++ b/
lib/product_category_service.dart
@@
-35,9
+35,9
@@
class ProductCategoryService {
}
}
}
}
- Future<
Null
> createProdCategory(String name) async {
+ Future<
String
> createProdCategory(String name) async {
try {
try {
- await _http.post(
+
var res =
await _http.post(
_posturl,
headers: {'Content-Type': 'application/json'},
body: JSON.encode({
_posturl,
headers: {'Content-Type': 'application/json'},
body: JSON.encode({
@@
-45,6
+45,7
@@
class ProductCategoryService {
'type': 'product_category'
})
);
'type': 'product_category'
})
);
+ return(JSON.decode(res.body)['id']);
}
catch(e) {
throw _handleError(e);
}
catch(e) {
throw _handleError(e);