codestates / codestates/Bobpago

[๐Ÿ“šDev Log] ๋ฐ•์„ฑํ›ˆ / 2021.09.26

Open
#88 0 comments 0 reactions 1 assignee Claimed by @tjdgns5272 View on GitHub
dev log
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.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.