From 48c64d5f6a6b3cf014d851b7d3c5bcdf7043c61a Mon Sep 17 00:00:00 2001
From: LeeWxx <dnckd0903@naver.com>
Date: Sun, 8 Dec 2024 00:16:11 +0900
Subject: [PATCH] =?UTF-8?q?fix:=20eslint=20=EC=A0=81=EC=9A=A9=20=EB=B0=8F?=
 =?UTF-8?q?=20=EC=98=A4=ED=83=80=20=EC=88=98=EC=A0=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 src/repositories/myRepository.js | 4 ++--
 src/routes/my.js                 | 6 +++++-
 src/services/myService.js        | 6 +++---
 3 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/src/repositories/myRepository.js b/src/repositories/myRepository.js
index b9996fb..9926626 100644
--- a/src/repositories/myRepository.js
+++ b/src/repositories/myRepository.js
@@ -37,8 +37,8 @@ const myRepository = {
   async getCombinationIdByTransactionId(transactionId) {
     const query = `
       SELECT combination_id
-      FROM Pcregister_Transection
-      WHERE transection_id = $1
+      FROM pcregister_transection
+      WHERE transaction_id = $1
     `;
     const values = [transactionId];
     const { rows } = await pool.query(query, values);
diff --git a/src/routes/my.js b/src/routes/my.js
index 271da45..8988965 100644
--- a/src/routes/my.js
+++ b/src/routes/my.js
@@ -33,7 +33,11 @@ myRouter.patch(
       throw new ReportableError(400, '유효한 새로운 이름이 필요합니다.');
     }
 
-    const result = await myService.updateCombinationName(userId, combinationId, newName);
+    const result = await myService.updateCombinationName(
+      userId,
+      combinationId,
+      newName
+    );
 
     return res.status(200).json(result);
   })
diff --git a/src/services/myService.js b/src/services/myService.js
index 236638d..385b1e4 100644
--- a/src/services/myService.js
+++ b/src/services/myService.js
@@ -76,7 +76,7 @@ const myService = {
 
   async getCombinationId(code) {
     const transactionIdKey = `mypc:code:${code}:transaction_id`;
-    
+
     try {
       const transactionId = await Redis.get(transactionIdKey);
       if (!transactionId) {
@@ -89,9 +89,9 @@ const myService = {
       const combinationId =
         await myRepository.getCombinationIdByTransactionId(transactionId);
 
-      res.sendResponse('', 200, {
+      return {
         combinationId: combinationId || null,
-      });
+      };
     } catch {
       throw new ReportableError(
         500,
-- 
GitLab