diff --git a/Makefile b/Makefile index 4b467971..2dc2b9ae 100644 --- a/Makefile +++ b/Makefile @@ -84,8 +84,8 @@ stage: build a-stage: build rsync -zavP --delete-before build/ -e 'ssh -p 666' ott-staging@staging.instat.tv:/usr/local/www/ott-staging/a-wwwroot/ -b-stage: build - rsync -zavP --delete-before build/ -e 'ssh -p 666' ott-staging@staging.instat.tv:/usr/local/www/ott-staging/b-wwwroot/ +b-stage: build_auth + rsync -zavP --delete-before build_auth/ -e 'ssh -p 666' ott-staging@10.0.3.8:/usr/local/www/ott-staging/b-wwwroot/ c-stage: build rsync -zavP --delete-before build/ -e 'ssh -p 666' ott-staging@staging.instat.tv:/usr/local/www/ott-staging/c-wwwroot/ diff --git a/src/features/AuthServiceApp/components/ChangePassword/hooks.tsx b/src/features/AuthServiceApp/components/ChangePassword/hooks.tsx index abcd86c9..a2c036c1 100644 --- a/src/features/AuthServiceApp/components/ChangePassword/hooks.tsx +++ b/src/features/AuthServiceApp/components/ChangePassword/hooks.tsx @@ -3,7 +3,6 @@ import { SyntheticEvent, useState, } from 'react' -import { useLocation } from 'react-router-dom' import { useAuthFields } from 'features/AuthServiceApp/hooks/useAuthFields' import { changePassword } from 'features/AuthServiceApp/requests/changePassword' @@ -18,20 +17,11 @@ export const useChangePasswordForm = () => { checkPassword, } = useAuthFields('login') - const { search } = useLocation() - - const getUrlParam = (key: string) => { - const token = new URLSearchParams(search).get(key) - return token - } - - const token = getUrlParam('token') - const handleSubmit = async (event: SyntheticEvent) => { event?.preventDefault() setIsFetching(true) try { - const redirectUrl = await changePassword(password, token || '') + const redirectUrl = await changePassword(password) setError('') setIsFetching(false) if (redirectUrl) { diff --git a/src/features/AuthServiceApp/components/ChangePassword/index.tsx b/src/features/AuthServiceApp/components/ChangePassword/index.tsx index 3cda92c5..c0d1d155 100644 --- a/src/features/AuthServiceApp/components/ChangePassword/index.tsx +++ b/src/features/AuthServiceApp/components/ChangePassword/index.tsx @@ -19,11 +19,9 @@ const ChangePassword = () => { const { confirmPassword, error, - // formError, handleSubmit, isFetching, isSubmitDisabled, - // onPasswordBlur, onConfirmPasswordChange, onPasswordChange, password, @@ -33,9 +31,6 @@ const ChangePassword = () => {
@@ -50,7 +45,6 @@ const ChangePassword = () => { placeholderLexic='password_new' value={password} onChange={onPasswordChange} - // onBlur={onPasswordBlur} /> { placeholderLexic='password_repeat' value={confirmPassword} onChange={onConfirmPasswordChange} - // onBlur={onPasswordBlur} /> diff --git a/src/features/AuthServiceApp/components/RecoveryPopup/hooks.tsx b/src/features/AuthServiceApp/components/RecoveryPopup/hooks.tsx index 3f444e78..7c8ce62d 100644 --- a/src/features/AuthServiceApp/components/RecoveryPopup/hooks.tsx +++ b/src/features/AuthServiceApp/components/RecoveryPopup/hooks.tsx @@ -56,7 +56,6 @@ export const useRecovery = (setIsModalOpen: (value: boolean) => void) => { isFetching, isSendBtnDisabled, isSendMessage, - // onEmailBlur, onEmailChange, } } diff --git a/src/features/AuthServiceApp/components/RecoveryPopup/index.tsx b/src/features/AuthServiceApp/components/RecoveryPopup/index.tsx index d4e57150..55aaedb5 100644 --- a/src/features/AuthServiceApp/components/RecoveryPopup/index.tsx +++ b/src/features/AuthServiceApp/components/RecoveryPopup/index.tsx @@ -17,7 +17,6 @@ import { } from './styled' import { Input } from '../Input' -// import { Error } from '../../styled' import { InputGroup, Error } from '../../styled' type Props = { @@ -31,7 +30,6 @@ export const RecoveryPopup = (props: Props) => { const { closePopup, error, - // onEmailBlur, handleSubmit, isFetching, isSendBtnDisabled, @@ -66,7 +64,6 @@ export const RecoveryPopup = (props: Props) => { autoComplete='email' placeholderLexic='registration_email' onChange={onEmailChange} - // onBlur={onEmailBlur} /> diff --git a/src/features/AuthServiceApp/requests/changePassword.tsx b/src/features/AuthServiceApp/requests/changePassword.tsx index e3aadf7d..03ca8564 100644 --- a/src/features/AuthServiceApp/requests/changePassword.tsx +++ b/src/features/AuthServiceApp/requests/changePassword.tsx @@ -1,8 +1,8 @@ import { getApiUrl } from '../config/routes' const errorLexics = { - 1: 'error_зassword mismatch', - 4: 'error_user_not_found', + 5: '', + 10: '', } type FailedResponse = { @@ -20,8 +20,8 @@ type SuccessResponse = { ok: true, } -export const changePassword = async (password: string, token: string) => { - const url = getApiUrl(`/change_password?token=${token}`) +export const changePassword = async (password: string) => { + const url = getApiUrl('/change_password') const init: RequestInit = { body: new URLSearchParams({ password,