Skip to content

Commit

Permalink
Merge pull request #72 from BCSDLab/fix/sha-256
Browse files Browse the repository at this point in the history
fix: 회원가입 sha-256추가, 경로변경
  • Loading branch information
ChoiWonBeen authored Jan 18, 2024
2 parents 2a32c76 + 935dcd5 commit a7d5136
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/pages/Auth/LoginPage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ function LoginPage() {
</div>
<div className={styles.help}>
<a className={styles.help__link} href="https://portal.koreatech.ac.kr/kut/page/findUser.jsp">아이디 찾기</a>
<Link className={styles.help__link} to="/findpw">비밀번호 찾기</Link>
<Link className={styles.help__link} to="/signup">회원가입</Link>
<Link className={styles.help__link} to="/auth/findpw">비밀번호 찾기</Link>
<Link className={styles.help__link} to="/auth/signup">회원가입</Link>
</div>
<span className={styles.template__copyright}>
COPYRIGHT ⓒ&nbsp;
Expand Down
5 changes: 3 additions & 2 deletions src/pages/Auth/SignupPage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import cn from 'utils/ts/classnames';
import useBooleanState from 'utils/hooks/useBooleanState';
import { koin, privacy } from 'static/terms';
import { DeptListResponse, IDept } from 'api/dept/entity';
import sha256 from 'utils/ts/SHA-256';
import styles from './SignupPage.module.scss';
import useNicknameDuplicateCheck from './hooks/useNicknameDuplicateCheck';
import useDeptList from './hooks/useDeptList';
Expand Down Expand Up @@ -444,11 +445,11 @@ const useSignupForm = () => {
navigate('/');
};
const { status, mutate } = useSignup({ onSuccess });
const submitForm: ISubmitForm = (formValue) => {
const submitForm: ISubmitForm = async (formValue) => {
const payload = {
// 필수정보
email: `${formValue.id?.trim()}@koreatech.ac.kr`,
password: formValue.password,
password: await sha256(formValue.password),
// 옵션
name: formValue.name || undefined,
nickname: formValue.nickname || undefined,
Expand Down

0 comments on commit a7d5136

Please sign in to comment.