Skip to content

Commit

Permalink
remove not working route rule check
Browse files Browse the repository at this point in the history
  • Loading branch information
fago committed Jan 10, 2025
1 parent 787fb3a commit aaa9839
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/runtime/composables/useDrupalCe/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ export const useDrupalCe = () => {
* Processes the given fetchOptions to apply module defaults
* @param fetchOptions Optional Nuxt useFetch options
* @param skipDrupalCeApiProxy Force skip the Drupal CE API proxy. Defaults to false.
* The proxy might still be skipped if disabled globally or via route rules.
* The proxy might still be skipped if serverApiProxy is set to false globally.
* @returns UseFetchOptions<any>
*/
const processFetchOptions = (fetchOptions: UseFetchOptions<any> = {}, skipDrupalCeApiProxy: boolean = false) => {
if (config.serverApiProxy && !skipDrupalCeApiProxy && useRoute().meta.drupalCeApiProxy !== false) {
if (config.serverApiProxy && !skipDrupalCeApiProxy) {
fetchOptions.baseURL = '/api/drupal-ce'
}
else {
Expand Down Expand Up @@ -99,7 +99,7 @@ export const useDrupalCe = () => {
* @param useFetchOptions Optional Nuxt useFetch options
* @param overrideErrorHandler Optional error handler
* @param skipDrupalCeApiProxy Force skip the Drupal CE API proxy. Defaults to false.
* The proxy might still be skipped if disabled globally or via route rules.
* The proxy might still be skipped if serverApiProxy is set to false globally.
*/
const fetchPage = async (path: string, useFetchOptions: UseFetchOptions<any> = {}, overrideErrorHandler?: (error?: any) => void, skipDrupalCeApiProxy: boolean = false) => { const nuxtApp = useNuxtApp()

Expand Down Expand Up @@ -179,7 +179,7 @@ export const useDrupalCe = () => {
* @param useFetchOptions Optional Nuxt useFetch options
* @param overrideErrorHandler Optional error handler
* @param skipDrupalCeApiProxy Force skip the Drupal CE API proxy. Defaults to false.
* The proxy might still be skipped if disabled globally or via route rules.
* The proxy might still be skipped if serverApiProxy is set to false globally.
*/
const fetchMenu = async (name: string, useFetchOptions: UseFetchOptions<any> = {}, overrideErrorHandler?: (error?: any) => void, skipDrupalCeApiProxy: boolean = false) => {
const nuxtApp = useNuxtApp()
Expand Down Expand Up @@ -209,7 +209,7 @@ export const useDrupalCe = () => {
}

// Override baseURL specifically for menu endpoints
if (config.serverApiProxy && !skipDrupalCeApiProxy && useRoute().meta.drupalCeApiProxy !== false) {
if (config.serverApiProxy && !skipDrupalCeApiProxy) {
useFetchOptions.baseURL = '/api/menu'
}
else {
Expand Down

0 comments on commit aaa9839

Please sign in to comment.