This commit is contained in:
2020-10-30 20:41:54 +00:00
parent b35ef49b6d
commit c0697ddd90
2 changed files with 56 additions and 2 deletions

View File

@@ -521,7 +521,20 @@ export default {
handleError("DELETE", error, route);
}
},
///////////////////////////////////
// PUT DATA TO API SERVER
// (used for puts that can't have a concurrency token like above)
async put(route, data) {
try {
let that = this;
let r = await fetch(that.APIUrl(route), that.fetchPutOptions(data));
that.statusEx(r);
r = await that.extractBodyEx(r);
return r;
} catch (error) {
handleError("UPSERT", error, route);
}
},
///////////////////////////////////
// POST FILE ATTACHMENTS
// @param {ayaId:objectid, ayaType:objectType, files:[array of files]}