Skip to content

Commit

Permalink
Merge pull request #70 from Murakano/feature/requests
Browse files Browse the repository at this point in the history
버그 수정 및 api url 수정
  • Loading branch information
grulla99 authored Jul 17, 2024
2 parents bf07cb2 + e7f50f6 commit 0c651e7
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/routes/user/user.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ exports.updateRequest = async (requestId, formData) => {
exports.updateRequestState = async (userId, requestId, status, formData, requestType) => {
if (userId) {
await userRepository.updateRequestState(userId, requestId, status, formData);
if (requestType === 'add') {
if (requestType === 'add') { //TODO: add 일 때, 단어 중복검사 로직 우선적 검증 추가
await wordRepository.addWord(requestId, formData);
await userRepository.updateRequest(requestId, formData); //수정값 사용자 요청 업데이트
} else if (requestType === 'mod') {
Expand Down
1 change: 1 addition & 0 deletions src/routes/word/word.repository.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ exports.updateWord = async (requestId, formData) => {
}

// word 데이터를 request 데이터로 업데이트합니다.
wordToUpdate.word = formData.devTerm;
wordToUpdate.awkPron = formData.awkPron;
wordToUpdate.comPron = formData.commonPron;
wordToUpdate.info = formData.addInfo;
Expand Down
2 changes: 1 addition & 1 deletion src/routes/word/word.route.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ wordRouter.get('/search/related', getRelatedWords);
wordRouter.post('/search/:searchTerm', isUser, getSearchWords);

//등록요청 단어 중복검사
wordRouter.post('/checkDuplicateWord', checkDuplicateWord);
wordRouter.post('/duplicate', checkDuplicateWord);


module.exports = wordRouter;
2 changes: 1 addition & 1 deletion src/swagger/request.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@

/**
* @swagger
* /words/checkDuplicateWord:
* /words/duplicate:
* post:
* summary: 개발 용어 중복 검사
* tags: [개발 용어 API]
Expand Down
2 changes: 1 addition & 1 deletion src/swagger/swagger.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const options = {
description: 'Local Development',
},
{
url: 'https://api.surakano.site/',
url: 'https://api.murakano.site/',
description: 'Real Server',
},
],
Expand Down

0 comments on commit 0c651e7

Please sign in to comment.