diff --git a/frontend/src/api/dto/auth.dto.ts b/frontend/src/api/dto/auth.dto.ts index 9d63e921..528a074a 100644 --- a/frontend/src/api/dto/auth.dto.ts +++ b/frontend/src/api/dto/auth.dto.ts @@ -1,11 +1,7 @@ export class LoginResEntity { - data: { - token: string | undefined; - userId: string | undefined; - } = { - token: undefined, - userId: undefined, - }; + token: string | undefined; + + userId: string | undefined; } export class RegisterResEntity { diff --git a/frontend/src/component/authmodal/AuthModal.tsx b/frontend/src/component/authmodal/AuthModal.tsx index dd565f01..79493a6b 100644 --- a/frontend/src/component/authmodal/AuthModal.tsx +++ b/frontend/src/component/authmodal/AuthModal.tsx @@ -59,9 +59,9 @@ export const AuthModal = (props: IAuthModalProps) => { const handleLoginClick = () => { doLogin(loginData.id, loginData.pw) .then(el => { - if (el.data?.data.token && el.data?.data.userId) { - saveLocalData(AppConfig.KEYS.LOGIN_TOKEN, el.data?.data.token); - saveLocalData(AppConfig.KEYS.LOGIN_USER, el.data?.data.userId); + if (el.data?.token && el.data?.userId) { + saveLocalData(AppConfig.KEYS.LOGIN_TOKEN, el.data.token); + saveLocalData(AppConfig.KEYS.LOGIN_USER, el.data.userId); } setError(''); props.onClose(); @@ -109,6 +109,7 @@ export const AuthModal = (props: IAuthModalProps) => { placeholder="PW" value={loginData.pw} onChange={handleChange} + type="password" /> {error ?
{error}
: ''}{error}
: ''}