Skip to content

Commit

Permalink
[fix] 디버깅용 코드 제거
Browse files Browse the repository at this point in the history
  • Loading branch information
hyejungg committed Dec 31, 2023
1 parent b268e3c commit 741433e
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/models/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,6 @@ module.exports = {
'SELECT user_id, fcm_token FROM users WHERE fcm_token = ?';
const [selectFcmToken] = await db.query(sqlSelectByFcmToken, [fcmToken]);

console.log(selectFcmToken);
console.log(selectFcmToken.length >= 1);

if (selectFcmToken.length >= 1) {
const sqlUpdate = 'UPDATE users SET fcm_token = null WHERE user_id = ?';
const [updateRows] = await db.queryWithTransaction(sqlUpdate, [
Expand Down Expand Up @@ -100,7 +97,7 @@ module.exports = {

const [rows] = await db.query(sqlSelect, [email]);

if (rows.affectedRows < 1) {
if (rows.length > 1) {
throw new NotFound(ErrorMessage.unValidateUser);
}

Expand All @@ -122,7 +119,7 @@ module.exports = {

const [rows] = await db.query(sqlSelect, [userId]);

if (rows.affectedRows < 1) {
if (rows.length > 1) {
throw new NotFound(ErrorMessage.unValidateUser);
}

Expand Down

0 comments on commit 741433e

Please sign in to comment.