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

Hyejung #7

Merged
merged 8 commits into from
May 27, 2022
Merged

Hyejung #7

merged 8 commits into from
May 27, 2022

Conversation

hyejungg
Copy link
Member

@hyejungg hyejungg commented May 25, 2022

๐ŸŒฑ๊ด€๋ จ ์ด์Šˆ

Related to:
#3
#5
#6

โ“๋ฆฌ๋ทฐ ํฌ์ธํŠธ

  • src/loaders/db.ts : ์ฝ”๋“œ ์‹คํ–‰ ์‹œ ๋นˆ ์ปจ๋ ‰์…˜์ด์–ด๋„ ์ปฌ๋ ‰์…˜ ์ƒ์„ฑ๋˜๋„๋ก ์ฝ”๋“œ ์ถ”๊ฐ€ํ•˜์˜€์Šต๋‹ˆ๋‹ค!
  • ๋ฆฌ๋ทฐ๋กœ ํ˜ผ๋‚ด์ฃผ์‹œ๋ฉด ๊ฐ์‚ฌ ๋•กํ ์ž…๋‹ˆ๋‹ค.
  • any๋ฅผ ์“ฐ์ง€ ์•Š๊ธฐ๋กœ ํ–ˆ๋Š”๋ฐ ReviewService.ts ์—์„œ getReviewList() ๋ถ€๋ถ„์—์„œ ๋ฐ์ดํ„ฐ ๊ฐ€๊ณต ์‹œ any๋ฅผ ์”€.. ์•ˆ์“ฐ๋Š” ๋ฐฉ๋ฒ•์ด ์žˆ์„์ง€์œ  ....?

๐Ÿ”ซ ์ฐธ๊ณ 

  • [CHORE] ์ฝ”๋“œ ์ปจ๋ฒค์…˜ ์ ์šฉ ๋ฐ README.md ์ถ”๊ฐ€ย #4 ์˜ ๊ฒฝ์šฐ ๋ช‡๋ช‡ ํŒŒ์ผ์—์„œ ์ปจ๋ฒค์…˜ ์ ์šฉ์ด ์•ˆ๋˜์–ด ์žˆ์–ด์„œ ์ œ๊ฐ€ ์ด์Šˆ๋ฅผ ์—ด๊ณ  ๊ด€๋ จ ์ปค๋ฐ‹์„ ๋„ฃ์–ด๋‘์—ˆ์Šต๋‹ˆ๋‹ค!
    • ex. " " ์‚ฌ์šฉ, ๋“ค์—ฌ์“ฐ๊ธฐ !
  • API ๋ช…์„ธ์„œ ์ž‘์„ฑ ๋ฐ ๊ตฌํ˜„ ์™„๋ฃŒ !

import Period from '../models/Period';
import Quantity from '../models/Quantity';
import Review from '../models/Review';
import Subscribe from '../models/Subscribe';
Copy link
Contributor

Choose a reason for hiding this comment

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

๋นผ๋จน์€ ๋กœ๋” ์ž˜ ์ฑ™๊ฒจ์ฃผ์…”์„œ ๊ฐ์‚ผ๋‹น~! ๐Ÿ‘

@@ -8,4 +8,4 @@ const QuantitySchema = new mongoose.Schema({
},
});

export default mongoose.model<QuantityInfo & mongoose.Document>('Queantity', QuantitySchema);
export default mongoose.model<QuantityInfo & mongoose.Document>('Quantity', QuantitySchema);
Copy link
Contributor

Choose a reason for hiding this comment

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

๋งˆ์ด ๋ฏธ์Šคํ…Œ์žŒ,,

const periodOptions = await Period.find();
const quantityOptions = await Quantity.find();

if (!periodOptions || !quantityOptions) {
Copy link
Contributor

Choose a reason for hiding this comment

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

์—๋Ÿฌ ๋กœ์ง ์ฒ˜๋ฆฌ ์ข‹์•„์š”

const review = new Review(reviewCreateDto);
await review.save();

const data = {
Copy link
Contributor

Choose a reason for hiding this comment

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

id๋ฟ๋งŒ ์•„๋‹ˆ๋ผ db์— ๋“ฑ๋ก๋œ ๋‹ค๋ฅธ ๋‚ด์šฉ๋„ response๋กœ ๋ณด๋‚ด์ฃผ๋ฉด ์•Œ๋งž๊ฒŒ post๋๋Š”์ง€ ํ™•์ธํ•˜๊ธฐ ์ข‹๋‹ต๋‹ˆ๋‹ค.

Copy link
Member Author

Choose a reason for hiding this comment

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

์˜ค์˜ค ์ข‹๋„ค์œ  ! ๊ทธ๋Ÿฌ๋ฉด findOne()์œผ๋กœ ํ•œ ๋ฒˆ ๊ฒ€์ƒ‰ํ•œ ๊ฒฐ๊ณผ๋ฅผ ๋ณด๋‚ด์ฃผ๋Š”๊ฒŒ ์ข‹์„๊นŒ์š” ?!

@hyejungg hyejungg merged commit a9c2f3f into dev May 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants