fix: Don't hit authenticated endpoints when logged out (#7563)

This commit is contained in:
garlic-hub
2026-04-29 21:21:48 -07:00
committed by GitHub
parent f354f12853
commit 5b37eb012c
4 changed files with 18 additions and 8 deletions

View File

@@ -6,7 +6,12 @@ const loading = ref(false);
export const useGroupSelf = function () {
const api = useUserApi();
const auth = useMealieAuth();
async function refreshGroupSelf() {
if (!auth.user.value) {
groupSelfRef.value = null;
return;
}
loading.value = true;
const { data } = await api.groups.getCurrentUserGroup();
groupSelfRef.value = data;