From 9378d562425e5a22a0eb13feaa18981cf2485297 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Sat, 30 Dec 2023 16:04:49 -0500 Subject: [PATCH] fix(pages): ensure band list is refreshed on subscribe/unsubscribe --- pages/bands.vue | 38 ++++++++++++++++++++++++++++++++------ 1 file changed, 32 insertions(+), 6 deletions(-) diff --git a/pages/bands.vue b/pages/bands.vue index 098f65e..52a71c7 100644 --- a/pages/bands.vue +++ b/pages/bands.vue @@ -7,7 +7,10 @@ const { data: bands } = (await useApiFetch>("/band/all")) as unknown as { data: Ref }; const { data: rd }: { data: any } = useAuth(); - const data = rd as { user: IUser }; + const refresh = async () => { + await useAuth().getSession({ force: true }); + rd.value = useAuth().data.value; + }; const hider = subscriptions; if (bands.value == null) bands.value = []; @@ -26,16 +29,39 @@ - - + + - + - - + +