Skip to content

Commit

Permalink
fix: body required로 바꾸기
Browse files Browse the repository at this point in the history
  • Loading branch information
Hyun-git committed Sep 21, 2024
1 parent 642d212 commit d0cea1a
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/controller/meme.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ const searchMemeListByKeyword = async (req: CustomRequest, res: Response, next:
const createMemeReaction = async (req: CustomRequest, res: Response, next: NextFunction) => {
const user = req.requestedUser;
const meme = req.requestedMeme;
const { count } = req.body || 0;
const { count = 1 } = req.body;

try {
const result: boolean = await MemeService.createMemeInteraction(
Expand Down
2 changes: 1 addition & 1 deletion src/routes/meme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1266,7 +1266,7 @@ router.post('/:memeId/watch/:type', getRequestedUserInfo, getRequestedMemeInfo,
* required: true
* description: 리액션할 밈 id
* requestBody:
* required: false
* required: true
* content:
* application/json:
* schema:
Expand Down
2 changes: 1 addition & 1 deletion src/service/meme.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ async function createMemeInteraction(
user: IUserDocument,
meme: IMemeDocument,
interactionType: InteractionType,
count: number = 0,
count: number = 1,
): Promise<boolean> {
try {
// 'save' interaction은 isDeleted 조건 검색 필요없음
Expand Down
2 changes: 1 addition & 1 deletion src/service/memeInteraction.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ async function updateMemeInteraction(
user: IUserDocument,
meme: IMemeDocument,
interactionType: InteractionType,
count: number = 0,
count: number = 1,
): Promise<void> {
switch (interactionType) {
// 'save' isDeleted false로 변경
Expand Down

0 comments on commit d0cea1a

Please sign in to comment.