reset endpoint + frontend reset and login pages add

This commit is contained in:
2026-09-26 19:26:57 +03:00
parent 489014667c
commit bcdf2b5154
32 changed files with 294 additions and 38 deletions
+11
View File
@@ -0,0 +1,11 @@
export async function requestPasswordReset(email: string): Promise<void> {
const res = await fetch(`http://localhost:8000/protected/reset?${new URLSearchParams({ email })}`, {
method: "POST",
credentials: "include",
});
if (!res.ok) {
const body = await res.json().catch(() => null);
throw new Error(typeof body?.detail === "string" ? body.detail : "Не удалось отправить запрос");
}
}