К
export const recoverPassword = (data: {email: string}) => async () => {
try {
const response = await api.resetPassword(data);
console.log(response);
return response;
} catch (e) {
console.log(e);
}
};
....
resetPassword: (data: {email: string}) => {
instance
.post('//reset-password', data)
.then((response) => response)
.catch((e) => e);
}
Не срабатывает await, а сразу приходит undefined не ожидая ответа. В чем может быть проблема? На сервер уходит запрос и приходит на почту письмо, а в приложении не приходит ответ. Пробовал через постман все работает.