This commit is contained in:
DecDuck
2026-06-21 17:01:37 +10:00
parent cbecd1161d
commit 505c324c26
2 changed files with 7 additions and 3 deletions
+6 -1
View File
@@ -9,7 +9,12 @@ export const updateUser = async () => {
const user = useUser();
if (user.value === null) return;
user.value = await $dropFetch<UserModel | null>("/api/v1/user");
user.value = await $dropFetch<UserModel | null>("/api/v1/user", {
// Forward headers manually when called outside a component
headers: import.meta.server
? useRequestHeaders(["cookie", "authorization"])
: undefined,
});
};
export async function completeSignin() {