Skip to content

Commit

Permalink
fixup! transfer ownership of a form
Browse files Browse the repository at this point in the history
Signed-off-by: hamza mahjoubi <hamzamahjoubi221@gmail.com>
  • Loading branch information
hamza221 committed Dec 9, 2023
1 parent 7bb1caf commit d2cdb30
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions appinfo/routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@
'apiVersion' => 'v2(\.[1-2])?'
]
],

// Questions
[
'name' => 'api#newQuestion',
Expand Down
2 changes: 1 addition & 1 deletion src/components/SidebarTabs/TransferOwnership.vue
Original file line number Diff line number Diff line change
Expand Up @@ -135,13 +135,13 @@ export default {
this.showModal = false
if (this.form.id && this.selected.shareWith) {
try {
emit('forms:last-updated:set', this.form.id)
await axios.post(generateOcsUrl('apps/forms/api/v2.2/form/transfer'), {
formId: this.form.id,
uid: this.selected.shareWith,
})
showSuccess(`${t('forms', 'This form is now owned by')} ${this.selected.displayName}`)
emit('forms:ownership-transfered', this.form.id)
emit('forms:last-updated:set', this.form.id)
} catch (error) {
logger.error('Error while transfering form ownership', { error })
showError(t('forms', 'An error occurred while transfering ownership'))
Expand Down

0 comments on commit d2cdb30

Please sign in to comment.