remove api prefix from routes (#280)
* remove api prefix from routes * PR changes --------- Co-authored-by: Julien Nahum <julien@nahum.net>
This commit is contained in:
@@ -101,7 +101,8 @@ export default {
|
||||
setup () {
|
||||
const workingFormStore = useWorkingFormStore()
|
||||
return {
|
||||
workingFormStore
|
||||
workingFormStore,
|
||||
runtimeConfig: useRuntimeConfig()
|
||||
}
|
||||
},
|
||||
|
||||
@@ -134,7 +135,7 @@ export default {
|
||||
if (!this.form) {
|
||||
return ''
|
||||
}
|
||||
return '/api/open/forms/' + this.form.id + '/submissions/export'
|
||||
return this.runtimeConfig.public.apiBase + '/open/forms/' + this.form.id + '/submissions/export'
|
||||
},
|
||||
filteredData () {
|
||||
if (!this.tableData) return []
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
}),
|
||||
methods: {
|
||||
async send () {
|
||||
const { data } = await this.form.post('/api/password/email')
|
||||
const { data } = await this.form.post('/password/email')
|
||||
this.isMailSent = true
|
||||
},
|
||||
close () {
|
||||
|
||||
@@ -120,7 +120,7 @@ export default {
|
||||
if (this.loading) return
|
||||
|
||||
this.loading = true
|
||||
this.aiForm.post('/api/forms/ai/generate').then(response => {
|
||||
this.aiForm.post('/forms/ai/generate').then(response => {
|
||||
this.useAlert.success(response.data.message)
|
||||
this.fetchGeneratedForm(response.data.ai_form_completion_id)
|
||||
}).catch(error => {
|
||||
|
||||
@@ -95,7 +95,7 @@ export default {
|
||||
}),
|
||||
|
||||
computed: {
|
||||
formEndpoint: () => '/api/open/forms/{id}',
|
||||
formEndpoint: () => '/open/forms/{id}',
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
||||
@@ -42,7 +42,7 @@ export default {
|
||||
|
||||
methods: {
|
||||
async send () {
|
||||
const { data } = await this.form.post('/api/password/email')
|
||||
const { data } = await this.form.post('/password/email')
|
||||
|
||||
this.status = data.status
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ export default {
|
||||
|
||||
methods: {
|
||||
async reset () {
|
||||
const { data } = await this.form.post('/api/password/reset')
|
||||
const { data } = await this.form.post('/password/reset')
|
||||
|
||||
this.status = data.status
|
||||
|
||||
|
||||
@@ -8,12 +8,12 @@
|
||||
Tools
|
||||
</h3>
|
||||
<div class="flex flex-wrap mb-5">
|
||||
<a href="/stats">
|
||||
<a :href="statsUrl" target="_blank">
|
||||
<v-button class="mx-1" color="gray" shade="lighter">
|
||||
Stats
|
||||
</v-button>
|
||||
</a>
|
||||
<a href="/horizon">
|
||||
<a :href="horizonUrl" target="_blank">
|
||||
<v-button class="mx-1" color="gray" shade="lighter">
|
||||
Horizon
|
||||
</v-button>
|
||||
@@ -53,6 +53,10 @@ let form = useForm({
|
||||
})
|
||||
let loading = false
|
||||
|
||||
const runtimeConfig = useRuntimeConfig()
|
||||
const statsUrl = runtimeConfig.public.apiBase + '/stats'
|
||||
const horizonUrl = runtimeConfig.public.apiBase + '/horizon'
|
||||
|
||||
const impersonate = () => {
|
||||
loading = true
|
||||
authStore.startImpersonating()
|
||||
|
||||
Reference in New Issue
Block a user