From 80ee6d818237235d8fbd8cb4f4723f411b314736 Mon Sep 17 00:00:00 2001 From: GUO YANKE Date: Wed, 31 Jul 2024 12:55:32 +0800 Subject: [PATCH] fix: change url for user detail for nuxt static serving --- ui/pages/dashboard/users/{[user_id]/index.vue => detail.vue} | 4 ++-- ui/pages/dashboard/users/index.vue | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) rename ui/pages/dashboard/users/{[user_id]/index.vue => detail.vue} (98%) diff --git a/ui/pages/dashboard/users/[user_id]/index.vue b/ui/pages/dashboard/users/detail.vue similarity index 98% rename from ui/pages/dashboard/users/[user_id]/index.vue rename to ui/pages/dashboard/users/detail.vue index 9660e03..f31b499 100644 --- a/ui/pages/dashboard/users/[user_id]/index.vue +++ b/ui/pages/dashboard/users/detail.vue @@ -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 = [ { @@ -53,7 +53,7 @@ async function onSubmit(event: FormSubmitEvent) { 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() diff --git a/ui/pages/dashboard/users/index.vue b/ui/pages/dashboard/users/index.vue index 4ca91b8..d89d8f7 100644 --- a/ui/pages/dashboard/users/index.vue +++ b/ui/pages/dashboard/users/index.vue @@ -119,7 +119,7 @@ async function updateUser(id: string, { is_admin, is_blocked }: { is_admin?: boo