Skip to content

Commit

Permalink
fix onLinkFile
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Hartmann <[email protected]>
  • Loading branch information
Chartman123 committed Jan 29, 2025
1 parent 84992cf commit 40d277e
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions src/views/Results.vue
Original file line number Diff line number Diff line change
Expand Up @@ -431,13 +431,13 @@ export default {
// Reload results, when form changes
async hash() {
await this.fetchFullForm(this.form.id)
this.loadFormResults()
await this.loadFormResults()
},
},

async beforeMount() {
await this.fetchFullForm(this.form.id)
this.loadFormResults()
await this.loadFormResults()
SetWindowTitle(this.formTitle)
},

Expand Down Expand Up @@ -508,7 +508,7 @@ export default {
.pick()
.then(async (path) => {
try {
const response = await axios.patch(
await axios.patch(
generateOcsUrl('apps/forms/api/v3/forms/{id}', {
id: this.form.id,
}),
Expand All @@ -519,15 +519,11 @@ export default {
},
},
)
const responseData = OcsResponse2Data(response)

this.form.fileFormat = responseData.fileFormat
this.form.fileId = responseData.fileId
this.form.filePath = responseData.filePath
await this.fetchFullForm(this.form.id)

showSuccess(
t('forms', 'File {file} successfully linked', {
file: responseData.fileName,
file: this.form.fileName,
}),
)
emit('forms:last-updated:set', this.form.id)
Expand Down

0 comments on commit 40d277e

Please sign in to comment.