refactor(DocumentController): remvoe Open endpoint and its client method
This commit is contained in:
@@ -71,17 +71,8 @@ class App {
|
||||
try {
|
||||
this.signatureCount = this.currentDocument.elements.length
|
||||
await createAnnotations(this.currentDocument, this.Instance)
|
||||
|
||||
const openResponse = await this.Network.openDocument(this.envelopeKey)
|
||||
|
||||
if (openResponse.fatal || openResponse.error) {
|
||||
return Swal.fire({
|
||||
title: 'Fehler',
|
||||
text: 'Umschlag konnte nicht geöffnet werden!',
|
||||
icon: 'error',
|
||||
})
|
||||
}
|
||||
} catch (e) {
|
||||
console.error("Error loading annotations:", e);
|
||||
}
|
||||
|
||||
//add click events of external buttons
|
||||
|
||||
@@ -30,15 +30,6 @@
|
||||
.then(this.wrapBinaryResponse.bind(this))
|
||||
}
|
||||
|
||||
/**
|
||||
* Tell the server that document has been seen
|
||||
* @param {any} envelopeKey
|
||||
*/
|
||||
async openDocument(envelopeKey) {
|
||||
return this.postRequest(`/api/document/${envelopeKey}`, {})
|
||||
.then(this.wrapJsonResponse.bind(this))
|
||||
}
|
||||
|
||||
/**
|
||||
* Add CSRF Token to request headers
|
||||
* @param {any} options
|
||||
|
||||
Reference in New Issue
Block a user