mirror of
https://github.com/mealie-recipes/mealie.git
synced 2026-05-07 02:23:30 -04:00
fix: Don't hit authenticated endpoints when logged out (#7563)
This commit is contained in:
@@ -6,8 +6,13 @@ const loading = ref(false);
|
||||
|
||||
export const useHouseholdSelf = function () {
|
||||
const api = useUserApi();
|
||||
const auth = useMealieAuth();
|
||||
|
||||
async function refreshHouseholdSelf() {
|
||||
if (!auth.user.value) {
|
||||
householdSelfRef.value = null;
|
||||
return;
|
||||
}
|
||||
loading.value = true;
|
||||
const { data } = await api.households.getCurrentUserHousehold();
|
||||
householdSelfRef.value = data;
|
||||
|
||||
Reference in New Issue
Block a user