This commit is contained in:
@@ -532,7 +532,21 @@ export default {
|
||||
r = await that.extractBodyEx(r);
|
||||
return r;
|
||||
} catch (error) {
|
||||
handleError("UPSERT", error, route);
|
||||
handleError("PUT", error, route);
|
||||
}
|
||||
},
|
||||
///////////////////////////////////
|
||||
// POST DATA TO API SERVER
|
||||
// (used for post only routes not needing upserts)
|
||||
async post(route, data) {
|
||||
try {
|
||||
let that = this;
|
||||
let r = await fetch(that.APIUrl(route), that.fetchPostOptions(data));
|
||||
that.statusEx(r);
|
||||
r = await that.extractBodyEx(r);
|
||||
return r;
|
||||
} catch (error) {
|
||||
handleError("POST", error, route);
|
||||
}
|
||||
},
|
||||
///////////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user