Новые правки в компоенты
This commit is contained in:
parent
e85d1ce668
commit
6f727aae7b
23 changed files with 1483 additions and 37 deletions
|
|
@ -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 }),
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue