This commit is contained in:
2020-11-03 00:08:10 +00:00
parent 259aa1be7b
commit bdfeabe03f
5 changed files with 51 additions and 13 deletions

View File

@@ -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);
}
},
///////////////////////////////////