Skip to content

Commit

Permalink
server component
Browse files Browse the repository at this point in the history
  • Loading branch information
arily committed Jul 6, 2023
1 parent cbf4ccc commit d52badf
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/pages/beatmap/[id].vue → src/pages/beatmap/[id].server.vue
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<script setup lang="ts" async>
const { id } = useRoute().params
if (!id || Array.isArray(id)) {
createError('please provide id')
createError('please provide valid id.')
}
const client = useNuxtApp()
const bm = await client.$client.map.beatmap.query({ id: id as string })
const bm = await client.$client.map.beatmap.query({ id: id as string, md5: id as string })
navigateTo({
name: 'beatmapset-id',
params: {
Expand All @@ -18,6 +18,11 @@ navigateTo({
definePageMeta({
alias: ['/b/:id', '/beatmaps/:id'],
render() {},
})
</script>

<script lang="ts">
export default {
template: '',
}
</script>

0 comments on commit d52badf

Please sign in to comment.