Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
benoitdemaegdt committed Feb 21, 2024
1 parent 4ca02b9 commit 6ec885e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
10 changes: 5 additions & 5 deletions middleware/voie-lyonnaise.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export default defineNuxtRouteMiddleware(to => {
// const voieLyonnaiseRegex = /voie-lyonnaise-(1[0-2]|[1-9])\b/;
// const isVoieLyonnaiseValid = voieLyonnaiseRegex.test(to.fullPath);
// if (!isVoieLyonnaiseValid) {
// return navigateTo('/404');
// }
const voieLyonnaiseRegex = /voie-lyonnaise-(1[0-2]|[1-9])\b/;
const isVoieLyonnaiseValid = voieLyonnaiseRegex.test(to.fullPath);
if (!isVoieLyonnaiseValid) {
return navigateTo('/404');
}
});
8 changes: 8 additions & 0 deletions pages/foo.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<template>
<h1>foo</h1>
</template>

<script setup lang="ts">
const { data } = await useFetch('/content');
console.log(data);
</script>

0 comments on commit 6ec885e

Please sign in to comment.