diff --git a/src/routes/user/user.service.js b/src/routes/user/user.service.js index b32d9d1..d52198f 100644 --- a/src/routes/user/user.service.js +++ b/src/routes/user/user.service.js @@ -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') { diff --git a/src/routes/word/word.repository.js b/src/routes/word/word.repository.js index ca84c75..681a920 100644 --- a/src/routes/word/word.repository.js +++ b/src/routes/word/word.repository.js @@ -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; diff --git a/src/routes/word/word.route.js b/src/routes/word/word.route.js index 0bbf5f1..e8391c5 100644 --- a/src/routes/word/word.route.js +++ b/src/routes/word/word.route.js @@ -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; diff --git a/src/swagger/request.js b/src/swagger/request.js index e7936ca..bbf1f77 100644 --- a/src/swagger/request.js +++ b/src/swagger/request.js @@ -99,7 +99,7 @@ /** * @swagger - * /words/checkDuplicateWord: + * /words/duplicate: * post: * summary: 개발 용어 중복 검사 * tags: [개발 용어 API] diff --git a/src/swagger/swagger.js b/src/swagger/swagger.js index d1b4616..63d8697 100644 --- a/src/swagger/swagger.js +++ b/src/swagger/swagger.js @@ -15,7 +15,7 @@ const options = { description: 'Local Development', }, { - url: 'https://api.surakano.site/', + url: 'https://api.murakano.site/', description: 'Real Server', }, ],