codestates / codestates/Bobpago

[๐ŸšจErr Handling] ์ด๋ฉ”์ผ ์ธ์ฆ ์˜ค๋ฅ˜ ๋ฐ ๊ฐœ์„ 

Open
#180 0 comments 0 reactions 1 assignee Claimed by @tjdgns5272 View on GitHub
complete error handling
Dominant language
TypeScript
Stars
5
Forks
3
PR merge metrics
No merged PRs in 30d

Description

### ์–ด๋–ค ์—๋Ÿฌ์ธ๊ฐ€์š”?
- ์ผ๋ฐ˜ ํšŒ์›(์ด๋ฉ”์ผ ํšŒ์› ๊ฐ€์ž…) ๋กœ๊ทธ์ธ์‹œ ๋น„๋ฐ€๋ฒˆํ˜ธ๋ฅผ ํ™•์ธํ•˜์ง€ ์•Š๊ณ , ์•„์ด๋””๋งŒ ๋น„๊ตํ•ด์„œ ๋กœ๊ทธ์ธ ์Šน์ธํ–ˆ์Œ

Pull Request ๐Ÿ‘‰๐Ÿป [PR1](https://github.com/codestates/Bobpago/pull/178) , [PR2](https://github.com/codestates/Bobpago/pull/179)

### ์—๋Ÿฌ ํ•ธ๋“ค๋ง ๋ฐฉ๋ฒ•

- ๋น„๋ฐ€๋ฒˆํ˜ธ์™€ ๊ฐ™์ด ์ธ์ฆ์„ ํ•  ์ˆ˜ ์žˆ๊ฒŒ ๋ณ€๊ฒฝํ–ˆ์Œ
- bcrypt ๋ฅผ ์ ์šฉํ•ด์„œ ๋น„๋ฐ€๋ฒˆํ˜ธ ์•”ํ˜ธํ™” ๋ณตํ˜ธํ™” ์ž‘์—…ํ•จ
- ๊ธฐ์กด ํšŒ์›๊ฐ€์ž… ์œ ์ €์™€ ์‹ ๊ทœ ์ด๋ฉ”์ผ ํšŒ์›๊ฐ€์ž… ์œ ์ € ๋กœ์ง์„ ๋‚˜๋ˆ ์„œ ์ธ์ฆ์ฒ˜๋ฆฌ ํ–ˆ์Œ

```js
const { email, password } = checkSignInDto;

const user = await this.usersRepository.findOne({ email });
const oldUser = await this.usersRepository.findOne({ email, password });

const checkPassword = await bcrypt.compare(password, user.password);
if (checkPassword || oldUser) {
// ๋กœ๊ทธ์ธ ์ฒ˜๋ฆฌ
}
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.