codestates / codestates/Bobpago
[๐Dev Log] ๋ฐ์ฑํ / 2021.09.26
- Dominant language
- TypeScript
- Stars
- 5
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Description
### ์ค๋์ ์ด๋ป๊ฒ ํ๋ก์ ํธ์ ๊ธฐ์ฌํ๋์?
- S3 ์ด๋ฏธ์ง ์
๋ก๋ ๊ฒฝ๋ก ๊ตฌ๋ถ (๋ ์ํผ, ๋๊ธ, ์ ์ ํ๋กํ) -> ์ฟผ๋ฆฌํ๋ผ๋ฏธํฐ๋ก ๊ฐ์ ๋ฐ์ ๊ตฌ๋ณํ๊ธฐ๋กํจ
- ๋ ์ํผ ์์
### ์ค๋์ ํ๋ก์ ํธ์์ ํ๋ ์ ์ ๋ฌด์์ธ๊ฐ์?
- ๋ ์ํผ ์์ ์ ๊ฐ ํ๋๋ค์ ์
๋ ฅ๊ฐ์ optionalํ ๊ฐ์ธ๋ฐ `this.recipeRepository.update()` ์์ ์ธ์๋ฅผ ์ด๋ป๊ฒ ์ ๋ฌํด์ผ ํ ์ง ๊ณ ๋ฏผํ์๋ค.
|| (OR) ์ฐ์ฐ์๋ฅผ ํ์ฉํ์ฌ ๊ธฐ์กด์ ์๋ ๋ฐ์ดํฐ๋ฅผ ์ฐ๊ธฐ๋ก ํ๋ค.
```ts
// recipes.service.ts
const { title, level, amount, estTime, ingredientId, description } =
updateRecipeDto;
// ๋ ์ํผ ํ
์ด๋ธ ์์
const targetRecipe = await this.recipeRepository.findOne({ id: recipeId });
const updatedRecipe = await this.recipeRepository.update(recipeId, {
title: title || targetRecipe.title,
level: level || targetRecipe.level,
amount: amount || targetRecipe.amount,
estTime: estTime || targetRecipe.estTime,
});
```
### ๋ด์ผ์ ํ๋ก์ ํธ์ ๊ธฐ์ฌํ๊ธฐ ์ํด ๋ฌด์์ ํด์ผ ํ๋์?
- [ ] ๋ ์ํผ ์์ ์์ ์ด๋ฏธ์ง description ํ
์ด๋ธ ์์ ๋ถ๋ถ ์์ฑํ๊ธฐ
- [ ] ๋ ์ํผ ์ญ์ ๊ตฌํํ๊ธฐ
- [ ] ๋ ์ํผ ๋ฐ์ ์ถ๊ฐ ์ญ์ ๊ตฌํ
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.