Added cover-image (Closes #103)

This commit is contained in:
Mawoka
2022-09-08 17:47:29 +02:00
parent 603e2834d6
commit 2ab9d14d3e
15 changed files with 186 additions and 29 deletions
+9 -3
View File
@@ -61,9 +61,15 @@
});
uppy.on('complete', (_) => {
console.log(pow_data);
data.questions[
selected_question
].image = `${window.location.origin}/api/v1/storage/download/${image_id}`;
if (selected_question === undefined) {
data.cover_image = `${window.location.origin}/api/v1/storage/download/${image_id}`;
} else {
data.questions[
selected_question
].image = `${window.location.origin}/api/v1/storage/download/${image_id}`;
}
console.log(selected_question, data);
modalOpen = false;
});
console.log(edit_id);