Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโ€™ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feat] Add mongo id form valid checker #124

Merged
merged 1 commit into from
Mar 5, 2022
Merged

Conversation

geeneve
Copy link
Member

@geeneve geeneve commented Mar 5, 2022

๐ŸŒˆ PR ์š”์•ฝ / Linked Issue

  • Request๋กœ ๋ฐ›์€ id๋“ค์ด mongodb id ํ˜•์‹์ธ์ง€ ํ™•์ธํ•˜๋Š” ์ฝ”๋“œ ์ถ”๊ฐ€
    close [feat] Check mongo ID validย #123

๐Ÿ“Œ ๋ณ€๊ฒฝ ์‚ฌํ•ญ

  • ์•ผ๋ฌด์ง„ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ import { isValidObjectId } from "mongoose";๋ฅผ ์‚ฌ์šฉํ•ด id ํ˜•์‹ ํ™•์ธํ•˜๋Š” ์ฝ”๋“œ๋ฅผ ์ถ”๊ฐ€ํ–ˆ์Šต๋‹ˆ๋‹ค.
  • ๋งŒ์•ฝ ์œ ํšจํ•˜์ง€ ์•Š์„ ๋•Œ ๋ณด๋‚ด์•ผ ํ•˜๋Š” response๋ฅผ ์ถ”๊ฐ€ํ–ˆ์Šต๋‹ˆ๋‹ค.
  • ์œ ํšจํ•˜์ง€ ์•Š์„ ๋•Œ WRONG_REQUEST_VALUE๋ฅผ ์“ฐ๊ธฐ๋กœ ํ•ด, ๊ธฐ์กด์— WRONG_REQUEST_VALUE๋ฅผ ์‚ฌ์šฉํ•˜๋˜ ๋ถ€๋ถ„์€ DB_NOT_FOUND๋กœ ์ˆ˜์ •ํ–ˆ์Šต๋‹ˆ๋‹ค.

โœ… PR check list

1. ์ œ๋ชฉ ์–‘์‹ ์ค€์ˆ˜ ํ™•์ธ

[feat] PR title

2. ํ…Œ์ŠคํŠธ ์ฝ”๋“œ ์ž‘๋™ ์Šคํฌ๋ฆฐ์ƒท

npm run mocha

โœ… After merge check list

1. ๋ฆด๋ฆฌ์ฆˆ ๋…ธํŠธ ๋ณ€๊ฒฝ

๋ฆด๋ฆฌ์ฆˆ ๋…ธํŠธ To Do์—์„œ Done์œผ๋กœ ์˜ฎ๊ธฐ๊ธฐ

2. ๋ธŒ๋žœ์น˜ ์‚ญ์ œ

@geeneve geeneve added ๐Ÿ€ feature ์ƒˆ๋กœ์šด ๊ธฐ๋Šฅ ์ถ”๊ฐ€ 3๏ธโƒฃ priority: low ์šฐ์„ ์ˆœ์œ„ ๋‚ฎ์Œ labels Mar 5, 2022
@geeneve geeneve added this to the v2.0.1 milestone Mar 5, 2022
@geeneve geeneve self-assigned this Mar 5, 2022
@@ -3,6 +3,7 @@ import mongoose from "mongoose";
// library
import constant from "../library/constant";
import { keysToSnake, keysToCamel } from "../library/convertSnakeToCamel";
import { isValidObjectId } from "mongoose";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good

@holmir97 holmir97 merged commit 1044a74 into develop Mar 5, 2022
@holmir97 holmir97 deleted the feat/mongoid-valid-check branch March 5, 2022 09:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3๏ธโƒฃ priority: low ์šฐ์„ ์ˆœ์œ„ ๋‚ฎ์Œ ๐Ÿ€ feature ์ƒˆ๋กœ์šด ๊ธฐ๋Šฅ ์ถ”๊ฐ€
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[feat] Check mongo ID valid
2 participants