This commit is contained in:
Jonathan Jenne
2023-11-20 10:56:25 +01:00
parent 36e441106a
commit ea35ed0e29
12 changed files with 83 additions and 100 deletions

View File

@@ -9,25 +9,6 @@
.then(res => res.arrayBuffer());
}
postDocument(envelopeKey, documentId, buffer) {
const url = `/api/document/${envelopeKey}?index=${documentId}`;
const options = {
credentials: "include",
method: "POST",
body: buffer
}
console.debug("PostDocument/Calling url: " + url)
return fetch(url, this.withCSRFToken(options))
.then(this.handleResponse)
.then((res) => {
if (!res.ok) {
return false;
};
return true;
});
}
postEnvelope(envelopeKey, documentId, jsonString) {
const url = `/api/envelope/${envelopeKey}?index=${documentId}`;
const options = {
@@ -47,12 +28,11 @@
});
}
postHistory(envelopeKey, actionType, actionDescription) {
postHistory(envelopeKey, actionType) {
const url = `/api/history/${envelopeKey}`;
const data = {
actionDescription: actionDescription,
actionType: actionType.toString()
actionType: actionType
}
const options = {