Migrate to nuxt settings page AND remove axios (#266)

* Settings pages migration

* remove axios and use opnFetch

* Make created form reactive (#267)

* Remove verify pages and axios lib

---------

Co-authored-by: Julien Nahum <julien@nahum.net>
This commit is contained in:
formsdev
2024-01-02 17:39:41 +05:30
committed by GitHub
parent 6fd2985ff5
commit 178424a184
27 changed files with 622 additions and 888 deletions

View File

@@ -16,7 +16,6 @@
</template>
<script>
import axios from 'axios'
export default {
components: { },
@@ -52,10 +51,10 @@ export default {
this.useAlert.confirm('Do you really want to delete this record?', this.deleteRecord)
},
async deleteRecord () {
axios.delete('/api/open/forms/' + this.form.id + '/records/' + this.rowid + '/delete').then(async (response) => {
if (response.data.type === 'success') {
opnFetch('/open/forms/' + this.form.id + '/records/' + this.rowid + '/delete', {method:'DELETE'}).then(async (data) => {
if (data.type === 'success') {
this.$emit('deleted')
this.useAlert.success(response.data.message)
this.useAlert.success(data.message)
} else {
this.useAlert.error('Something went wrong!')
}