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:
@@ -28,7 +28,6 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import axios from 'axios'
|
||||
import { Line as LineChart } from 'vue-chartjs'
|
||||
import {
|
||||
Chart as ChartJS,
|
||||
|
||||
@@ -72,7 +72,6 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import axios from 'axios'
|
||||
import { computed } from 'vue'
|
||||
import QuestionsEditor from './QuestionsEditor.vue'
|
||||
|
||||
@@ -175,9 +174,9 @@ export default {
|
||||
},
|
||||
async deleteFormTemplate () {
|
||||
if (!this.template) return
|
||||
axios.delete('/api/templates/' + this.template.id).then((response) => {
|
||||
if (response.data.message) {
|
||||
this.useAlert.success(response.data.message)
|
||||
opnFetch('/templates/' + this.template.id, {method:'DELETE'}).then((data) => {
|
||||
if (data.message) {
|
||||
this.useAlert.success(data.message)
|
||||
}
|
||||
this.$router.push({ name: 'templates' })
|
||||
this.templatesStore.remove(this.template)
|
||||
|
||||
Reference in New Issue
Block a user