Новые правки в компоенты

This commit is contained in:
Web-serfer 2026-04-18 18:25:10 +05:00
parent e85d1ce668
commit 6f727aae7b
23 changed files with 1483 additions and 37 deletions

View file

@ -73,7 +73,7 @@ import { SITE_URL } from '@constants';
submitBtn.textContent = 'Отправка...';
try {
const response = await fetch('/api/auth/forgot-password', {
const response = await fetch('/api/auth/request-password-reset', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ email }),

View file

@ -157,10 +157,10 @@ const error = Astro.url.searchParams.get('error');
submitBtn.textContent = 'Сохранение...';
try {
const response = await fetch('/api/auth/reset-password', {
const response = await fetch('/api/auth/confirm-password-reset', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ token, userId, password }),
body: JSON.stringify({ token, password, passwordConfirm }),
});
const data = await response.json();