From 7952cde76d69ca4d3b7fe20110027efc2d2d60e6 Mon Sep 17 00:00:00 2001 From: Ss0Mae Date: Mon, 3 Feb 2025 11:40:41 +0900 Subject: [PATCH 1/7] =?UTF-8?q?[Fix]=20=ED=94=84=EB=A1=9C=EC=A0=9D?= =?UTF-8?q?=ED=8A=B8=20=EA=B6=8C=ED=99=98=20=ED=99=95=EC=9D=B8=20=EC=97=90?= =?UTF-8?q?=EB=9F=AC=EB=A9=94=EC=84=B8=EC=A7=80=20=EA=B0=95=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/project/project.service.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/modules/project/project.service.ts b/src/modules/project/project.service.ts index 88c0410..6eaa510 100644 --- a/src/modules/project/project.service.ts +++ b/src/modules/project/project.service.ts @@ -650,6 +650,11 @@ export class ProjectService { where: { id: projectId }, select: { user_id: true }, }); + + if (!auth) { + throw new NotFoundException('프로젝트를 찾을 수 없습니다.'); + } + return auth.user_id === userId; } From ff7e609a49a61da87a150f3c66596f09e7074bff Mon Sep 17 00:00:00 2001 From: Ss0Mae Date: Mon, 3 Feb 2025 11:47:31 +0900 Subject: [PATCH 2/7] =?UTF-8?q?[Feat]=20=ED=94=84=EB=A1=9C=EC=A0=9D?= =?UTF-8?q?=ED=8A=B8=20=EC=82=AD=EC=A0=9C=EC=8B=9C=20=ED=8A=B8=EB=A0=8C?= =?UTF-8?q?=EC=A0=9D=EC=85=98=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/project/project.service.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/modules/project/project.service.ts b/src/modules/project/project.service.ts index 6eaa510..83e0295 100644 --- a/src/modules/project/project.service.ts +++ b/src/modules/project/project.service.ts @@ -830,6 +830,10 @@ export class ProjectService { where: { post_id: projectId }, }), + this.prisma.userApplyProject.deleteMany({ + where: { post_id: projectId }, + }), + this.prisma.projectPost.delete({ where: { id: projectId }, }), From 6e8acc524667903749187c50d3694d5d7a9562be Mon Sep 17 00:00:00 2001 From: Dong Hyun Date: Mon, 3 Feb 2025 13:06:12 +0900 Subject: [PATCH 3/7] =?UTF-8?q?[Feat]=20=ED=94=84=EB=A1=9C=EC=A0=9D?= =?UTF-8?q?=ED=8A=B8=20=ED=8E=98=EC=9D=B4=EC=A7=80=20=EA=B2=80=EC=83=89=20?= =?UTF-8?q?=EA=B2=B0=EA=B3=BC=20=EC=9D=91=EB=8B=B5=20=EB=8D=B0=EC=9D=B4?= =?UTF-8?q?=ED=84=B0=EC=97=90=20creatdAt=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/search/search.service.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/search/search.service.ts b/src/search/search.service.ts index 6a8a0e6..5331151 100644 --- a/src/search/search.service.ts +++ b/src/search/search.service.ts @@ -254,6 +254,7 @@ export class SearchService { viewCount: res.view + 1, status: res.recruiting ? 'OPEN' : 'CLOSED', isMarked: res.Saves.length, + createdAT: res.created_at, })); return projects; } From 06fae338d19e91df4f3b91a951a6e5c180e65397 Mon Sep 17 00:00:00 2001 From: Ss0Mae Date: Mon, 3 Feb 2025 14:50:27 +0900 Subject: [PATCH 4/7] =?UTF-8?q?[Feat]=20CORS=20=EC=84=A4=EC=A0=95=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.ts b/src/main.ts index 65eadb9..395dad9 100644 --- a/src/main.ts +++ b/src/main.ts @@ -16,7 +16,7 @@ async function bootstrap() { 'http://localhost:8080', 'https://p-a-d.store', ], - methods: ['GET', 'POST', 'PATCH', 'DELETE', 'OPTIONS'], // 💡 GET 포함 + methods: ['GET', 'POST', 'PATCH', 'DELETE', 'OPTIONS', 'PUT'], // 💡 GET 포함 credentials: true, allowedHeaders: ['Authorization', 'Content-Type'], // 💡 CORS 요청 헤더 허용 exposedHeaders: ['Authorization'], // 💡 클라이언트에서 응답 헤더 사용 가능 From 9f1f1a9bb39f9066a741fee51928e36a36ad5c05 Mon Sep 17 00:00:00 2001 From: Ss0Mae Date: Mon, 3 Feb 2025 14:50:46 +0900 Subject: [PATCH 5/7] =?UTF-8?q?[Feat]=20=EA=B5=AC=EA=B8=80=20=EB=B0=B0?= =?UTF-8?q?=ED=8F=AC=20=EC=84=9C=EB=B2=84=EB=A1=9C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/auth/auth.service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/auth/auth.service.ts b/src/modules/auth/auth.service.ts index f3cc7c4..47d3999 100644 --- a/src/modules/auth/auth.service.ts +++ b/src/modules/auth/auth.service.ts @@ -24,7 +24,7 @@ export class AuthService { code, client_id: process.env.GOOGLE_CLIENT_ID, client_secret: process.env.GOOGLE_CLIENT_SECRET, - redirect_uri: process.env.GOOGLE_CALLBACK_DEVELOP_URL, + redirect_uri: process.env.GOOGLE_CALLBACK_DEPLOY_URL, grant_type: 'authorization_code', } ); From 0e4bad9456675ac0f217887c62e32b194f5ca46d Mon Sep 17 00:00:00 2001 From: Ss0Mae Date: Mon, 3 Feb 2025 14:51:00 +0900 Subject: [PATCH 6/7] =?UTF-8?q?[Feat]=20=EA=B5=AC=EA=B8=80=20=EB=B0=B0?= =?UTF-8?q?=ED=8F=AC=20=EC=84=9C=EB=B2=84=EB=A1=9C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/auth/strategies/google.strategy.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/auth/strategies/google.strategy.ts b/src/modules/auth/strategies/google.strategy.ts index 6d23dba..8a8d799 100644 --- a/src/modules/auth/strategies/google.strategy.ts +++ b/src/modules/auth/strategies/google.strategy.ts @@ -9,7 +9,7 @@ export class GoogleStrategy extends PassportStrategy(Strategy, 'google') { super({ clientID: process.env.GOOGLE_CLIENT_ID, clientSecret: process.env.GOOGLE_CLIENT_SECRET, - callbackURL: process.env.GOOGLE_CALLBACK_DEVELOP_URL, + callbackURL: process.env.GOOGLE_CALLBACK_DEPLOY_URL, scope: ['email', 'profile'], }); } From 3ddd69179aa7ff36ad3e5f2e948c5ad993c54948 Mon Sep 17 00:00:00 2001 From: Ss0Mae Date: Mon, 3 Feb 2025 14:51:21 +0900 Subject: [PATCH 7/7] =?UTF-8?q?[Feat]=20=EC=95=8C=EB=A6=BC=20=EC=84=A4?= =?UTF-8?q?=EC=A0=95=20CORS=20=EC=84=A4=EC=A0=95=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../notification/Interceptors/notification.interceptor.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/notification/Interceptors/notification.interceptor.ts b/src/modules/notification/Interceptors/notification.interceptor.ts index 8bae288..99b63fc 100644 --- a/src/modules/notification/Interceptors/notification.interceptor.ts +++ b/src/modules/notification/Interceptors/notification.interceptor.ts @@ -16,7 +16,7 @@ export class SseInterceptor implements NestInterceptor { res.setHeader('Content-Type', 'text/event-stream'); res.setHeader('Cache-Control', 'no-cache, no-transform'); res.setHeader('Connection', 'keep-alive'); - res.setHeader('Access-Control-Allow-Origin', 'http://localhost:5173'); // CORS 설정 필요시 추가 + res.setHeader('Access-Control-Allow-Origin', '*'); // CORS 설정 필요시 추가 res.setHeader('Access-Control-Allow-Credentials', 'true'); res.flushHeaders(); // 즉시 헤더를 전송하여 연결이 끊기지 않도록 함 }