Browse Source

Suppression de API en tant que Root pour les URL "normale"

Vincent GUFFON 4 years ago
parent
commit
5ddb7ea774

+ 1 - 1
components/Layout/AlertBar/Cotisation.vue

@@ -62,7 +62,7 @@ export default defineComponent({
       const response = await $dataProvider.invoke({
         type: QUERY_TYPE.DEFAULT,
         id: profileOrganization.id,
-        url: 'cotisations'
+        url: '/api/cotisations'
       })
       cotisation_year.value = response.data.cotisationYear
       handleShow(response.data.alertState)

+ 1 - 1
services/connection/urlBuilder.ts

@@ -59,7 +59,7 @@ class UrlBuilder {
     if (typeof url === 'undefined') {
       throw new TypeError('url must be defined')
     }
-    return UrlBuilder.concat(UrlBuilder.ROOT, url)
+    return UrlBuilder.concat(url)
   }
 
   /**

+ 1 - 1
store/index.js

@@ -48,7 +48,7 @@ export const actions = {
   async getUserProfile ({ dispatch }) {
     const myProfile = await this.app.context.$dataProvider.invoke({
       type: QUERY_TYPE.DEFAULT,
-      url: 'my_profile'
+      url: '/api/my_profile'
     })
     await dispatch('profile/access/setProfile', myProfile.data)
   }

+ 1 - 1
use/form/useValidator.ts

@@ -19,7 +19,7 @@ class UseValidator {
     const checkSiret = async (siret: string) => {
       const response = await $dataManager.invoke({
         type: QUERY_TYPE.DEFAULT,
-        url: 'siret-checking',
+        url: '/api/siret-checking',
         id: siret
       })
       if (typeof response !== 'undefined') {