fix(EnvelopeController): remove envelopeKey route parameter

This commit is contained in:
2025-09-04 23:17:24 +02:00
parent 77070a8cfc
commit 1d605e9da3
5 changed files with 26 additions and 9 deletions

View File

@@ -272,7 +272,7 @@ class App {
// Export annotation data and save to database
try {
const res = await postEnvelope(this.envelopeKey, await iJSON);
const res = await postEnvelope(await iJSON);
if (!res.ok) {
if (res.status === 403) {

View File

@@ -8,7 +8,7 @@ const csrfToken = { 'X-XSRF-TOKEN': document.getElementsByName('__RequestVerific
* @param {any} envelopeKey
* @param {any} annotations
*/
function postEnvelope(envelopeKey, annotations) {
function postEnvelope(annotations) {
const token = csrfToken
const options = {
credentials: 'include',
@@ -20,7 +20,7 @@ function postEnvelope(envelopeKey, annotations) {
body: JSON.stringify(annotations)
}
return fetch(`/api/envelope/${envelopeKey}`, options)
return fetch(`/api/envelope`, options)
}
async function setLangAsync(language, flagCode) {