Skip to content

Commit

Permalink
fix: change url for user detail for nuxt static serving
Browse files Browse the repository at this point in the history
  • Loading branch information
yankeguo committed Jul 31, 2024
1 parent bbcc116 commit 80ee6d8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ definePageMeta({
middleware: ["auth"],
})
const { data: grants, refresh: refreshGrants } = await useGrants(useRoute().params.user_id as string);
const { data: grants, refresh: refreshGrants } = await useGrants(useRoute().query.user_id as string);
const columns = [
{
Expand Down Expand Up @@ -53,7 +53,7 @@ async function onSubmit(event: FormSubmitEvent<any>) {
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify(Object.assign({ user_id: useRoute().params.user_id }, event.data))
body: JSON.stringify(Object.assign({ user_id: useRoute().query.user_id }, event.data))
})
await refreshGrants()
Expand Down
2 changes: 1 addition & 1 deletion ui/pages/dashboard/users/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ async function updateUser(id: string, { is_admin, is_blocked }: { is_admin?: boo
<UTable :rows="users.users" :columns="columns">
<template #id-data="{ row }">
<UButton class="font-semibold" variant="link"
:to="{ name: 'dashboard-users-user_id', params: { user_id: row.id } }" :label="row.id">
:to="{ name: 'dashboard-users-detail', query: { user_id: row.id } }" :label="row.id">
</UButton>
</template>
<template #role-data="{ row }">
Expand Down

0 comments on commit 80ee6d8

Please sign in to comment.