From 1ddd12296cd8b3587883bee439795a5eac27b874 Mon Sep 17 00:00:00 2001 From: urimJ Date: Thu, 23 Nov 2023 18:05:10 +0900 Subject: [PATCH] =?UTF-8?q?API:=20=EB=8F=84=EC=95=88=EC=95=84=ED=8B=B0?= =?UTF-8?q?=EC=8A=A4=ED=8A=B8=ED=83=AD=20=EC=97=90=EB=9F=AC=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/main.js b/main.js index c312319..b351b44 100644 --- a/main.js +++ b/main.js @@ -7,10 +7,9 @@ import { S3Client, PutObjectCommand } from "@aws-sdk/client-s3"; import crypto from 'crypto'; import dotenv from 'dotenv'; dotenv.config(); -// import { Strategy as JwtStrategy } from 'passport-jwt'; -// import { ExtractJwt as ExtracJwt } from 'passport-jwt'; -// //import { User } from 'db.js'; -// import { DataTypes, Model, Sequelize } from 'sequelize'; +import { Strategy as JwtStrategy } from 'passport-jwt'; +import { ExtractJwt as ExtracJwt } from 'passport-jwt'; +import { DataTypes, Model, Sequelize } from 'sequelize'; // import { Artist, // Favorite, // Collection, @@ -888,7 +887,7 @@ app.get('/mypage/:userId/myCollection/:albumName/activePhotocard', async (req, r //아티스트 탭 정보 조회(도안이 하나라도 있는 경우) app.get('/mypage/:userId/myPolaroid/artistTab', async(req, res)=>{ const userId = req.params.userId; - const sql = `SELECT a.artistId, a.groupName FROM artists a + const sql = `SELECT DISTINCT a.artistId, a.groupName FROM artists a INNER JOIN photoCards pc ON pc.enterComp = a.enterComp INNER JOIN Polaroids pl ON pl.photocardId = pc.photocardId WHERE pl.userUserId = ?`; @@ -898,7 +897,7 @@ app.get('/mypage/:userId/myPolaroid/artistTab', async(req, res)=>{ item.groupName = item.groupName.replace(/\([^)]*\)/, '').trim(); }); const r = { - postArtistTabList: result + polaroidArtistTabList: result } res.status(200).send(r); })