mirror of
https://github.com/mealie-recipes/mealie.git
synced 2026-05-06 18:13:31 -04:00
fix: Don't hit authenticated endpoints when logged out (#7563)
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user