Use a proper DELETE to delete the form in a more resty way

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
Roeland Jago Douma 2019-08-30 21:32:47 +02:00
commit fa8be2e60d
No known key found for this signature in database
GPG key ID: F941078878347C0C
3 changed files with 10 additions and 6 deletions

View file

@ -63,9 +63,9 @@
</template>
<script>
// import moment from 'moment'
// import lodash from 'lodash'
import formListItem from '../components/formListItem'
import axios from 'nextcloud-axios'
export default {
name: 'List',
@ -119,7 +119,7 @@ export default {
buttonConfirmText: t('forms', 'Yes, delete form.'),
onConfirm: () => {
// this.deleteForm(index, event)
this.$http.post(OC.generateUrl('apps/forms/remove/form'), event)
axios.delete(OC.generateUrl('apps/forms/forms/{id}', {id: event.id}))
.then((response) => {
this.forms.splice(index, 1)
OC.Notification.showTemporary(t('forms', 'Form "%n" deleted', 1, event.title))