controller refactoring part 11

This commit is contained in:
Peter Papp
2021-07-20 17:17:18 +02:00
parent 2d814f3839
commit b0859f71cd
22 changed files with 295 additions and 252 deletions
@@ -104,7 +104,7 @@
if (setupIntent) {
axios
.post('/api/user/payment-cards', {
.post('/api/user/subscription/payment-cards', {
token: setupIntent.payment_method,
default: this.defaultPaymentMethod,
})
+1 -1
View File
@@ -2,7 +2,7 @@
<PageTab :is-loading="isLoading">
<PageTabGroup v-show="! isLoading">
<FormLabel>{{ $t('user_invoices.title') }}</FormLabel>
<DatatableWrapper @init="isLoading = false" api="/api/user/invoices" :paginator="false" :columns="columns" class="table">
<DatatableWrapper @init="isLoading = false" api="/api/user/subscription/invoices" :paginator="false" :columns="columns" class="table">
<!--Table data content-->
<template slot-scope="{ row }">
+3 -3
View File
@@ -151,7 +151,7 @@
})
},
fetchPaymentMethods() {
axios.get('/api/user/payment-cards')
axios.get('/api/user/subscription/payment-cards')
.then(response => {
if (response.status == 204) {
@@ -182,7 +182,7 @@
this.deletingID = data.id
axios.post('/api/user/payment-cards/' + data.id, {
axios.post('/api/user/subscription/payment-cards/' + data.id, {
_method: 'delete'
})
.then(() => {
@@ -206,7 +206,7 @@
if (data.operation === 'set-as-default-credit-card') {
axios.post('/api/user/payment-cards/' + data.id, {
axios.post('/api/user/subscription/payment-cards/' + data.id, {
default: 1,
_method: 'patch'
})