feat: resolve status paths with router (#258)

This commit is contained in:
Daniel Roe 2022-11-30 17:15:18 +00:00 committed by GitHub
parent 24bbe9135b
commit 4ed1816806
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 106 additions and 50 deletions

View file

@ -1,15 +1,11 @@
<script setup lang="ts">
definePageMeta({
name: 'status-by-id',
middleware: async (to) => {
const params = to.params
const id = params.status as string
const status = await fetchStatus(id)
return {
path: getStatusPath(status),
state: {
status: status as any,
},
}
return getStatusRoute(status)
},
})
</script>