diff --git a/app/Http/Controllers/SpaController.php b/app/Http/Controllers/SpaController.php deleted file mode 100644 index 50456f1..0000000 --- a/app/Http/Controllers/SpaController.php +++ /dev/null @@ -1,18 +0,0 @@ - (new SeoMetaResolver($request))->getMetas(), - ]); - } -} diff --git a/app/Providers/RouteServiceProvider.php b/app/Providers/RouteServiceProvider.php index faee4fa..b9d4a78 100644 --- a/app/Providers/RouteServiceProvider.php +++ b/app/Providers/RouteServiceProvider.php @@ -40,18 +40,13 @@ class RouteServiceProvider extends ServiceProvider $this->routes(function () { - Route::prefix('api') - ->middleware('api') + Route::middleware('api') ->namespace($this->namespace) ->group(base_path('routes/api.php')); Route::middleware('web') ->namespace($this->namespace) ->group(base_path('routes/web.php')); - - Route::middleware('spa') - ->namespace($this->namespace) - ->group(base_path('routes/spa.php')); }); } diff --git a/client/components/open/forms/components/FormSubmissions.vue b/client/components/open/forms/components/FormSubmissions.vue index 32beba1..3cbf8dc 100644 --- a/client/components/open/forms/components/FormSubmissions.vue +++ b/client/components/open/forms/components/FormSubmissions.vue @@ -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 [] diff --git a/client/components/pages/auth/ForgotPasswordModal.vue b/client/components/pages/auth/ForgotPasswordModal.vue index b5f0440..d437db3 100644 --- a/client/components/pages/auth/ForgotPasswordModal.vue +++ b/client/components/pages/auth/ForgotPasswordModal.vue @@ -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 () { diff --git a/client/components/pages/forms/create/CreateFormBaseModal.vue b/client/components/pages/forms/create/CreateFormBaseModal.vue index 3966ecc..e2b4b0f 100644 --- a/client/components/pages/forms/create/CreateFormBaseModal.vue +++ b/client/components/pages/forms/create/CreateFormBaseModal.vue @@ -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 => { diff --git a/client/components/pages/forms/show/RegenerateFormLink.vue b/client/components/pages/forms/show/RegenerateFormLink.vue index ad23640..40e3aa7 100644 --- a/client/components/pages/forms/show/RegenerateFormLink.vue +++ b/client/components/pages/forms/show/RegenerateFormLink.vue @@ -95,7 +95,7 @@ export default { }), computed: { - formEndpoint: () => '/api/open/forms/{id}', + formEndpoint: () => '/open/forms/{id}', }, methods: { diff --git a/client/pages/auth/password/email.vue b/client/pages/auth/password/email.vue index d277490..289dfe0 100644 --- a/client/pages/auth/password/email.vue +++ b/client/pages/auth/password/email.vue @@ -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 diff --git a/client/pages/auth/password/reset.vue b/client/pages/auth/password/reset.vue index e3c0da9..b82032d 100644 --- a/client/pages/auth/password/reset.vue +++ b/client/pages/auth/password/reset.vue @@ -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 diff --git a/client/pages/settings/admin.vue b/client/pages/settings/admin.vue index b168fb3..99e2325 100644 --- a/client/pages/settings/admin.vue +++ b/client/pages/settings/admin.vue @@ -8,12 +8,12 @@ Tools