Fix save progress bug

This commit is contained in:
adilallo
2026-05-20 19:58:32 -06:00
parent 2f2b5d0dc2
commit 7ee6282c1a
14 changed files with 193 additions and 88 deletions
+2
View File
@@ -41,6 +41,7 @@ export async function fetchAuthSession(): Promise<{
export async function requestMagicLink(
email: string,
nextPath?: string,
draft?: CreateFlowState,
): Promise<{ ok: true } | { ok: false; error: string; retryAfterMs?: number }> {
const res = await fetch("/api/auth/magic-link/request", {
method: "POST",
@@ -49,6 +50,7 @@ export async function requestMagicLink(
body: JSON.stringify({
email,
...(nextPath ? { next: nextPath } : {}),
...(draft && Object.keys(draft).length > 0 ? { draft } : {}),
}),
});
const data = await parseJson<{ error?: string; retryAfterMs?: number }>(res);