From c258ab4420c9145c6bec7857a8f5323aee3c5519 Mon Sep 17 00:00:00 2001 From: jihwooon Date: Thu, 2 Nov 2023 13:39:40 +0900 Subject: [PATCH 1/4] =?UTF-8?q?App=20=EC=96=B4=ED=94=8C=EB=A6=AC=EC=BC=80?= =?UTF-8?q?=EC=9D=B4=EC=85=98=EC=9D=84=20=EC=A0=9C=EA=B1=B0=ED=95=98?= =?UTF-8?q?=EB=9D=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit App 어플리케이션은 사용하지 않아 제거했습니다 --- server/src/app.controller.spec.ts | 22 --------------------- server/src/app.controller.ts | 12 ----------- server/src/app.module.ts | 4 ---- server/src/app.service.ts | 8 -------- server/test/app.e2e-spec.ts | 33 ------------------------------- 5 files changed, 79 deletions(-) delete mode 100644 server/src/app.controller.spec.ts delete mode 100644 server/src/app.controller.ts delete mode 100644 server/src/app.service.ts delete mode 100644 server/test/app.e2e-spec.ts diff --git a/server/src/app.controller.spec.ts b/server/src/app.controller.spec.ts deleted file mode 100644 index 8909b0d..0000000 --- a/server/src/app.controller.spec.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { Test, TestingModule } from '@nestjs/testing' -import { AppController } from './app.controller' -import { AppService } from './app.service' - -describe('AppController class', () => { - let appController: AppController - - beforeEach(async () => { - const app: TestingModule = await Test.createTestingModule({ - controllers: [AppController], - providers: [AppService], - }).compile() - - appController = app.get(AppController) - }) - - describe('getHello method', () => { - it('Hello World를 리턴해야 한다"', () => { - expect(appController.getHello()).toBe('Hello World!') - }) - }) -}) diff --git a/server/src/app.controller.ts b/server/src/app.controller.ts deleted file mode 100644 index 4e88eca..0000000 --- a/server/src/app.controller.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Controller, Get } from '@nestjs/common' -import { AppService } from './app.service' - -@Controller() -export class AppController { - constructor(private readonly appService: AppService) {} - - @Get() - getHello(): string { - return this.appService.getHello() - } -} diff --git a/server/src/app.module.ts b/server/src/app.module.ts index 6948b40..7d5b9cd 100644 --- a/server/src/app.module.ts +++ b/server/src/app.module.ts @@ -1,7 +1,5 @@ import { Module } from '@nestjs/common' import { RouterModule } from '@nestjs/core' -import { AppController } from './app.controller' -import { AppService } from './app.service' import { ConfigModule } from '@nestjs/config' import { ItemModule } from './items/item.module' import { AuthModule } from './auth/auth.module' @@ -23,7 +21,5 @@ import { ExceptionModule } from './config/error/exception.module' }, ]), ], - controllers: [AppController], - providers: [AppService], }) export class AppModule {} diff --git a/server/src/app.service.ts b/server/src/app.service.ts deleted file mode 100644 index bc13055..0000000 --- a/server/src/app.service.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Injectable } from '@nestjs/common' - -@Injectable() -export class AppService { - getHello(): string { - return 'Hello World!' - } -} diff --git a/server/test/app.e2e-spec.ts b/server/test/app.e2e-spec.ts deleted file mode 100644 index bf47341..0000000 --- a/server/test/app.e2e-spec.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { Test, TestingModule } from '@nestjs/testing' -import { INestApplication } from '@nestjs/common' -import * as request from 'supertest' -import { AppController } from '../src/app.controller' -import { AppService } from '../src/app.service' - -describe('AppController (e2e)', () => { - let app: INestApplication - let appService: AppService - let appController: AppController - - beforeAll(async () => { - const moduleFixture: TestingModule = await Test.createTestingModule({ - controllers: [AppController], - providers: [AppService], - }).compile() - - appController = moduleFixture.get(AppController) - appService = moduleFixture.get(AppService) - - app = moduleFixture.createNestApplication() - - await app.init() - }) - - it('/ (GET)', () => { - return request(app.getHttpServer()).get('/').expect(200).expect('Hello World!') - }) - - afterAll(async () => { - await app.close() - }) -}) From f70b3788c61b57ed60049c512fa099be634e9306 Mon Sep 17 00:00:00 2001 From: jihwooon Date: Thu, 2 Nov 2023 14:24:22 +0900 Subject: [PATCH 2/4] =?UTF-8?q?DB=20helper=EB=A5=BC=20=EC=A0=9C=EA=B1=B0?= =?UTF-8?q?=ED=95=98=EB=9D=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit mock을 사용함으로 이 로직은 사용하지 않습니다 --- server/src/config/helper/db.helper.ts | 14 -------------- 1 file changed, 14 deletions(-) delete mode 100644 server/src/config/helper/db.helper.ts diff --git a/server/src/config/helper/db.helper.ts b/server/src/config/helper/db.helper.ts deleted file mode 100644 index 7cd01f8..0000000 --- a/server/src/config/helper/db.helper.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { Connection } from 'mysql2/promise' -import { Inject } from '@nestjs/common' -import { MYSQL_CONNECTION } from '../database/constants' - -export class DbHelper { - constructor( - @Inject(MYSQL_CONNECTION) - private connection: Connection, - ) {} - - async clear(table_name: string): Promise { - await this.connection.execute(`truncate table ${table_name}`) - } -} From 04fe31adfe10d5dfccd0baf8c37992326bb25177 Mon Sep 17 00:00:00 2001 From: jihwooon Date: Thu, 2 Nov 2023 14:25:37 +0900 Subject: [PATCH 3/4] =?UTF-8?q?Exception=20=ED=8F=B4=EB=8D=94=20=EA=B2=BD?= =?UTF-8?q?=EB=A1=9C=EB=A5=BC=20=EC=88=98=EC=A0=95=ED=95=98=EB=9D=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Exception 경로를 수정했습니다 --- server/src/app.module.ts | 2 +- server/src/{config/error => exception}/exception.module.ts | 0 server/src/{config/error => exception}/http-exception.filter.ts | 0 3 files changed, 1 insertion(+), 1 deletion(-) rename server/src/{config/error => exception}/exception.module.ts (100%) rename server/src/{config/error => exception}/http-exception.filter.ts (100%) diff --git a/server/src/app.module.ts b/server/src/app.module.ts index 7d5b9cd..e118516 100644 --- a/server/src/app.module.ts +++ b/server/src/app.module.ts @@ -3,7 +3,7 @@ import { RouterModule } from '@nestjs/core' import { ConfigModule } from '@nestjs/config' import { ItemModule } from './items/item.module' import { AuthModule } from './auth/auth.module' -import { ExceptionModule } from './config/error/exception.module' +import { ExceptionModule } from './exception/exception.module' @Module({ imports: [ diff --git a/server/src/config/error/exception.module.ts b/server/src/exception/exception.module.ts similarity index 100% rename from server/src/config/error/exception.module.ts rename to server/src/exception/exception.module.ts diff --git a/server/src/config/error/http-exception.filter.ts b/server/src/exception/http-exception.filter.ts similarity index 100% rename from server/src/config/error/http-exception.filter.ts rename to server/src/exception/http-exception.filter.ts From bba1d9e6856ec777c0a4666d832c7a44aba9b6e9 Mon Sep 17 00:00:00 2001 From: jihwooon Date: Thu, 2 Nov 2023 14:26:27 +0900 Subject: [PATCH 4/4] =?UTF-8?q?Database=20=ED=8F=B4=EB=8D=94=20=EA=B2=BD?= =?UTF-8?q?=EB=A1=9C=EB=A5=BC=20=EC=88=98=EC=A0=95=ED=95=98=EB=9D=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Database 경로를 수정했습니다 --- server/src/auth/signin/application/signin.service.test.ts | 2 +- server/src/auth/signin/signin.module.ts | 2 +- server/src/auth/signin/web/signin.controller.test.ts | 2 +- server/src/auth/signout/application/signout.service.test.ts | 2 +- server/src/auth/signout/signout.module.ts | 2 +- server/src/auth/signout/web/signout.controller.test.ts | 2 +- server/src/auth/signup/application/signup.service.test.ts | 2 +- server/src/auth/signup/signup.module.ts | 2 +- server/src/auth/signup/web/signup.controller.test.ts | 2 +- server/src/auth/token/application/token.issuer.test.ts | 2 +- server/src/auth/token/token.module.ts | 2 +- server/src/auth/token/web/token.controller.test.ts | 2 +- server/src/{config => }/database/constants.ts | 0 server/src/{config => }/database/database.module.ts | 0 server/src/{config => }/database/database.providers.ts | 0 server/src/item-images/application/item-image.creater.test.ts | 2 +- server/src/item-images/domain/item-image.repository.ts | 2 +- server/src/item-images/item-image.module.ts | 2 +- server/src/items/application/item.creater.test.ts | 2 +- server/src/items/application/item.reader.test.ts | 2 +- server/src/items/application/item.updater.test.ts | 2 +- server/src/items/domain/item.repository.test.ts | 2 +- server/src/items/domain/item.repository.ts | 2 +- server/src/items/web/item-create.controller.test.ts | 2 +- server/src/items/web/item-detail.controller.test.ts | 2 +- server/src/items/web/item-update.controller.test.ts | 2 +- server/src/jwt/jwt.module.ts | 2 +- server/src/members/application/email.checker.test.ts | 2 +- server/src/members/domain/member.repository.test.ts | 2 +- server/src/members/domain/member.repository.ts | 2 +- server/src/members/member.module.ts | 2 +- server/test/item-create.e2e-spec.ts | 2 +- server/test/item-detail.e2e-spec.ts | 2 +- server/test/item-update.e2e-spec.ts | 2 +- server/test/signin.e2e-spec.ts | 2 +- server/test/signout.e2e-spec.ts | 2 +- server/test/signup.e2e-spec.ts | 2 +- server/test/token.e2e-spec.ts | 2 +- 38 files changed, 35 insertions(+), 35 deletions(-) rename server/src/{config => }/database/constants.ts (100%) rename server/src/{config => }/database/database.module.ts (100%) rename server/src/{config => }/database/database.providers.ts (100%) diff --git a/server/src/auth/signin/application/signin.service.test.ts b/server/src/auth/signin/application/signin.service.test.ts index 4dbe0cc..2ac07ab 100644 --- a/server/src/auth/signin/application/signin.service.test.ts +++ b/server/src/auth/signin/application/signin.service.test.ts @@ -1,7 +1,7 @@ import { Test, TestingModule } from '@nestjs/testing' import { Connection } from 'mysql2/promise' import { MemberRepository } from '../../../members/domain/member.repository' -import { MYSQL_CONNECTION } from '../../../config/database/constants' +import { MYSQL_CONNECTION } from '../../../database/constants' import { JwtProvider } from '../../../jwt/jwt.provider' import { SigninService } from './signin.service' import { InternalServerErrorException, BadRequestException } from '@nestjs/common' diff --git a/server/src/auth/signin/signin.module.ts b/server/src/auth/signin/signin.module.ts index f4eaaa4..609041c 100644 --- a/server/src/auth/signin/signin.module.ts +++ b/server/src/auth/signin/signin.module.ts @@ -1,7 +1,7 @@ import { Module } from '@nestjs/common' import { SigninService } from './application/signin.service' import { SigninController } from './web/signin.controller' -import { DatabaseModule } from '../../config/database/database.module' +import { DatabaseModule } from '../../database/database.module' import { MemberModule } from '../../members/member.module' import { JwtModule } from '../../jwt/jwt.module' import { TokenModule } from '../token/token.module' diff --git a/server/src/auth/signin/web/signin.controller.test.ts b/server/src/auth/signin/web/signin.controller.test.ts index 030b905..fab6c06 100644 --- a/server/src/auth/signin/web/signin.controller.test.ts +++ b/server/src/auth/signin/web/signin.controller.test.ts @@ -1,7 +1,7 @@ import { Test, TestingModule } from '@nestjs/testing' import { Connection } from 'mysql2/promise' import { MemberRepository } from '../../../members/domain/member.repository' -import { MYSQL_CONNECTION } from '../../../config/database/constants' +import { MYSQL_CONNECTION } from '../../../database/constants' import { PasswordProvider } from '../../../members/application/password.provider' import { JwtProvider } from '../../../jwt/jwt.provider' import { SigninService } from '../application/signin.service' diff --git a/server/src/auth/signout/application/signout.service.test.ts b/server/src/auth/signout/application/signout.service.test.ts index f5b14af..8af2dad 100644 --- a/server/src/auth/signout/application/signout.service.test.ts +++ b/server/src/auth/signout/application/signout.service.test.ts @@ -1,7 +1,7 @@ import { Test, TestingModule } from '@nestjs/testing' import { Connection } from 'mysql2/promise' import { MemberRepository } from '../../../members/domain/member.repository' -import { MYSQL_CONNECTION } from '../../../config/database/constants' +import { MYSQL_CONNECTION } from '../../../database/constants' import { JwtProvider } from '../../../jwt/jwt.provider' import { SignoutService } from './signout.service' import { TokenExpiredException } from '../../token/error/token_expired.exception' diff --git a/server/src/auth/signout/signout.module.ts b/server/src/auth/signout/signout.module.ts index cbb5e4f..766921a 100644 --- a/server/src/auth/signout/signout.module.ts +++ b/server/src/auth/signout/signout.module.ts @@ -1,5 +1,5 @@ import { Module } from '@nestjs/common' -import { DatabaseModule } from '../../config/database/database.module' +import { DatabaseModule } from '../../database/database.module' import { MemberModule } from '../../members/member.module' import { JwtModule } from '../../jwt/jwt.module' import { SignoutService } from './application/signout.service' diff --git a/server/src/auth/signout/web/signout.controller.test.ts b/server/src/auth/signout/web/signout.controller.test.ts index 9f8bf25..b0af54c 100644 --- a/server/src/auth/signout/web/signout.controller.test.ts +++ b/server/src/auth/signout/web/signout.controller.test.ts @@ -3,7 +3,7 @@ import { Connection } from 'mysql2/promise' import { SignoutController } from './signout.controller' import { SignoutService } from '../application/signout.service' import { MemberRepository } from '../../../members/domain/member.repository' -import { MYSQL_CONNECTION } from '../../../config/database/constants' +import { MYSQL_CONNECTION } from '../../../database/constants' import { JwtProvider } from '../../../jwt/jwt.provider' import { Response } from 'express' import { TokenIssuer } from '../../token/application/token.issuer' diff --git a/server/src/auth/signup/application/signup.service.test.ts b/server/src/auth/signup/application/signup.service.test.ts index 1fba7bd..d2d5dbb 100644 --- a/server/src/auth/signup/application/signup.service.test.ts +++ b/server/src/auth/signup/application/signup.service.test.ts @@ -2,7 +2,7 @@ import { Test, TestingModule } from '@nestjs/testing' import { Connection } from 'mysql2/promise' import { MemberRepository } from '../../../members/domain/member.repository' import { EmailChecker } from '../../../members/application/email.checker' -import { MYSQL_CONNECTION } from '../../../config/database/constants' +import { MYSQL_CONNECTION } from '../../../database/constants' import { SignupService } from './signup.service' import { PasswordProvider } from '../../../members/application/password.provider' import { JwtProvider } from '../../../jwt/jwt.provider' diff --git a/server/src/auth/signup/signup.module.ts b/server/src/auth/signup/signup.module.ts index 2da6dc8..c340b7b 100644 --- a/server/src/auth/signup/signup.module.ts +++ b/server/src/auth/signup/signup.module.ts @@ -1,5 +1,5 @@ import { Module } from '@nestjs/common' -import { DatabaseModule } from '../../config/database/database.module' +import { DatabaseModule } from '../../database/database.module' import { MemberModule } from '../../members/member.module' import { JwtModule } from '../../jwt/jwt.module' import { SignupService } from './application/signup.service' diff --git a/server/src/auth/signup/web/signup.controller.test.ts b/server/src/auth/signup/web/signup.controller.test.ts index 9aceeaa..86efe5f 100644 --- a/server/src/auth/signup/web/signup.controller.test.ts +++ b/server/src/auth/signup/web/signup.controller.test.ts @@ -4,7 +4,7 @@ import { SignupController } from './signup.controller' import { Connection } from 'mysql2/promise' import { MemberRepository } from '../../../members/domain/member.repository' import { EmailChecker } from '../../../members/application/email.checker' -import { MYSQL_CONNECTION } from '../../../config/database/constants' +import { MYSQL_CONNECTION } from '../../../database/constants' import { userMock } from '../../../fixture/memberFixture' import { SignupService } from '../application/signup.service' import { PasswordProvider } from '../../../members/application/password.provider' diff --git a/server/src/auth/token/application/token.issuer.test.ts b/server/src/auth/token/application/token.issuer.test.ts index 45134ca..f16b1e1 100644 --- a/server/src/auth/token/application/token.issuer.test.ts +++ b/server/src/auth/token/application/token.issuer.test.ts @@ -2,7 +2,7 @@ import { Test, TestingModule } from '@nestjs/testing' import { Connection } from 'mysql2/promise' import { TokenIssuer } from './token.issuer' import { MemberRepository } from '../../../members/domain/member.repository' -import { MYSQL_CONNECTION } from '../../../config/database/constants' +import { MYSQL_CONNECTION } from '../../../database/constants' import { MemberNotFoundException } from '../../../members/application/error/member-not-found.exception' import { userMock } from '../../../fixture/memberFixture' import { JwtProvider } from '../../../jwt/jwt.provider' diff --git a/server/src/auth/token/token.module.ts b/server/src/auth/token/token.module.ts index 1fd5503..471c4e3 100644 --- a/server/src/auth/token/token.module.ts +++ b/server/src/auth/token/token.module.ts @@ -1,5 +1,5 @@ import { Module } from '@nestjs/common' -import { DatabaseModule } from '../../config/database/database.module' +import { DatabaseModule } from '../../database/database.module' import { TokenController } from './web/token.controller' import { TokenIssuer } from './application/token.issuer' import { MemberModule } from '../../members/member.module' diff --git a/server/src/auth/token/web/token.controller.test.ts b/server/src/auth/token/web/token.controller.test.ts index 80e9abc..085d383 100644 --- a/server/src/auth/token/web/token.controller.test.ts +++ b/server/src/auth/token/web/token.controller.test.ts @@ -2,7 +2,7 @@ import { Test, TestingModule } from '@nestjs/testing' import { UnauthorizedException } from '@nestjs/common' import { Connection } from 'mysql2/promise' import { MemberRepository } from '../../../members/domain/member.repository' -import { MYSQL_CONNECTION } from '../../../config/database/constants' +import { MYSQL_CONNECTION } from '../../../database/constants' import { JwtProvider } from '../../../jwt/jwt.provider' import { TokenController } from './token.controller' import { TokenIssuer } from '../application/token.issuer' diff --git a/server/src/config/database/constants.ts b/server/src/database/constants.ts similarity index 100% rename from server/src/config/database/constants.ts rename to server/src/database/constants.ts diff --git a/server/src/config/database/database.module.ts b/server/src/database/database.module.ts similarity index 100% rename from server/src/config/database/database.module.ts rename to server/src/database/database.module.ts diff --git a/server/src/config/database/database.providers.ts b/server/src/database/database.providers.ts similarity index 100% rename from server/src/config/database/database.providers.ts rename to server/src/database/database.providers.ts diff --git a/server/src/item-images/application/item-image.creater.test.ts b/server/src/item-images/application/item-image.creater.test.ts index a51f1ea..228dd8d 100644 --- a/server/src/item-images/application/item-image.creater.test.ts +++ b/server/src/item-images/application/item-image.creater.test.ts @@ -1,6 +1,6 @@ import { Test, TestingModule } from '@nestjs/testing' import { itemMock } from '../../fixture/itemFixture' -import { MYSQL_CONNECTION } from '../../config/database/constants' +import { MYSQL_CONNECTION } from '../../database/constants' import { Connection } from 'mysql2/promise' import { when } from 'jest-when' import { fileMock, filesMock } from '../../fixture/itemImageFixture' diff --git a/server/src/item-images/domain/item-image.repository.ts b/server/src/item-images/domain/item-image.repository.ts index 4216403..f7a7d48 100644 --- a/server/src/item-images/domain/item-image.repository.ts +++ b/server/src/item-images/domain/item-image.repository.ts @@ -1,6 +1,6 @@ import { Connection, ResultSetHeader, RowDataPacket } from 'mysql2/promise' import { Inject } from '@nestjs/common' -import { MYSQL_CONNECTION } from '../../config/database/constants' +import { MYSQL_CONNECTION } from '../../database/constants' import { ItemImage } from './item-image.entity' export class ItemImageRepository { diff --git a/server/src/item-images/item-image.module.ts b/server/src/item-images/item-image.module.ts index 4a2188e..588cedd 100644 --- a/server/src/item-images/item-image.module.ts +++ b/server/src/item-images/item-image.module.ts @@ -1,5 +1,5 @@ import { Module } from '@nestjs/common' -import { DatabaseModule } from '../config/database/database.module' +import { DatabaseModule } from '../database/database.module' import { ItemImageCreater } from '../item-images/application/item-image.creater' import { ItemImageRepository } from '../item-images/domain/item-image.repository' import { ItemImageUpdater } from '../item-images/application/item-image.updater' diff --git a/server/src/items/application/item.creater.test.ts b/server/src/items/application/item.creater.test.ts index 33d2558..f4ee707 100644 --- a/server/src/items/application/item.creater.test.ts +++ b/server/src/items/application/item.creater.test.ts @@ -2,7 +2,7 @@ import { ItemRepository } from '../domain/item.repository' import { Test, TestingModule } from '@nestjs/testing' import { ItemCreater } from './item.creater' import { itemMock } from '../../fixture/itemFixture' -import { MYSQL_CONNECTION } from '../../config/database/constants' +import { MYSQL_CONNECTION } from '../../database/constants' import { Connection } from 'mysql2/promise' import { InternalServerErrorException } from '@nestjs/common' import { userMock } from '../../fixture/memberFixture' diff --git a/server/src/items/application/item.reader.test.ts b/server/src/items/application/item.reader.test.ts index 3f740d3..92fe538 100644 --- a/server/src/items/application/item.reader.test.ts +++ b/server/src/items/application/item.reader.test.ts @@ -2,7 +2,7 @@ import { ItemRepository } from '../domain/item.repository' import { Test, TestingModule } from '@nestjs/testing' import { itemMock } from '../../fixture/itemFixture' import { ItemReader } from './item.reader' -import { MYSQL_CONNECTION } from '../../config/database/constants' +import { MYSQL_CONNECTION } from '../../database/constants' import { Connection } from 'mysql2/promise' import { when } from 'jest-when' import { ItemNotFoundException } from '../error/item-not-found.exception' diff --git a/server/src/items/application/item.updater.test.ts b/server/src/items/application/item.updater.test.ts index cdfd73a..e91a545 100644 --- a/server/src/items/application/item.updater.test.ts +++ b/server/src/items/application/item.updater.test.ts @@ -3,7 +3,7 @@ import { Test, TestingModule } from '@nestjs/testing' import { ItemUpdater } from './item.updater' import { ItemRepository } from '../domain/item.repository' import { itemMock } from '../../fixture/itemFixture' -import { MYSQL_CONNECTION } from '../../config/database/constants' +import { MYSQL_CONNECTION } from '../../database/constants' import { when } from 'jest-when' import { Item } from '../domain/item.entity' import { ItemStatusEnum } from '../domain/item-status.enum' diff --git a/server/src/items/domain/item.repository.test.ts b/server/src/items/domain/item.repository.test.ts index e9b146c..29a350a 100644 --- a/server/src/items/domain/item.repository.test.ts +++ b/server/src/items/domain/item.repository.test.ts @@ -2,7 +2,7 @@ import { ResultSetHeader, RowDataPacket } from 'mysql2/promise' import { Test, TestingModule } from '@nestjs/testing' import { dbItemMock, detailItemMock, itemMock } from '../../fixture/itemFixture' import { ItemRepository } from './item.repository' -import { MYSQL_CONNECTION } from '../../config/database/constants' +import { MYSQL_CONNECTION } from '../../database/constants' describe('ItemRepository class', () => { let itemRepository: ItemRepository diff --git a/server/src/items/domain/item.repository.ts b/server/src/items/domain/item.repository.ts index 6c0bf2c..2fd4d5e 100644 --- a/server/src/items/domain/item.repository.ts +++ b/server/src/items/domain/item.repository.ts @@ -1,7 +1,7 @@ import { Connection, ResultSetHeader, RowDataPacket } from 'mysql2/promise' import { Item } from './item.entity' import { Inject } from '@nestjs/common' -import { MYSQL_CONNECTION } from '../../config/database/constants' +import { MYSQL_CONNECTION } from '../../database/constants' export class ItemRepository { constructor( diff --git a/server/src/items/web/item-create.controller.test.ts b/server/src/items/web/item-create.controller.test.ts index b9a9148..dc2a9a0 100644 --- a/server/src/items/web/item-create.controller.test.ts +++ b/server/src/items/web/item-create.controller.test.ts @@ -3,7 +3,7 @@ import { ItemCreateController } from './item-create.controller' import { ItemCreater } from '../application/item.creater' import { ItemRepository } from '../domain/item.repository' import { itemMock } from '../../fixture/itemFixture' -import { MYSQL_CONNECTION } from '../../config/database/constants' +import { MYSQL_CONNECTION } from '../../database/constants' import { Connection } from 'mysql2/promise' import { CreateItemRequest } from '../dto/save-item.dto' import { InternalServerErrorException } from '@nestjs/common' diff --git a/server/src/items/web/item-detail.controller.test.ts b/server/src/items/web/item-detail.controller.test.ts index fe1ea92..97a9e9d 100644 --- a/server/src/items/web/item-detail.controller.test.ts +++ b/server/src/items/web/item-detail.controller.test.ts @@ -3,7 +3,7 @@ import { ItemRepository } from '../domain/item.repository' import { itemMock } from '../../fixture/itemFixture' import { ItemDetailController } from './item-detail.controller' import { ItemReader } from '../application/item.reader' -import { MYSQL_CONNECTION } from '../../config/database/constants' +import { MYSQL_CONNECTION } from '../../database/constants' import { Connection } from 'mysql2/promise' import { ItemResponse } from '../dto/detail-item.dto' import { JwtProvider } from '../../jwt/jwt.provider' diff --git a/server/src/items/web/item-update.controller.test.ts b/server/src/items/web/item-update.controller.test.ts index ac2245c..b3a0b43 100644 --- a/server/src/items/web/item-update.controller.test.ts +++ b/server/src/items/web/item-update.controller.test.ts @@ -2,7 +2,7 @@ import { Test, TestingModule } from '@nestjs/testing' import { ItemUpdateController } from './item-update.controller' import { ItemUpdater } from '../application/item.updater' import { ItemRepository } from '../domain/item.repository' -import { MYSQL_CONNECTION } from '../../config/database/constants' +import { MYSQL_CONNECTION } from '../../database/constants' import { Connection } from 'mysql2/promise' import { itemMock } from '../../fixture/itemFixture' import { UpdateItemRequest } from '../dto/update-item.dto' diff --git a/server/src/jwt/jwt.module.ts b/server/src/jwt/jwt.module.ts index bee03e0..3df5c12 100644 --- a/server/src/jwt/jwt.module.ts +++ b/server/src/jwt/jwt.module.ts @@ -1,5 +1,5 @@ import { Module } from '@nestjs/common' -import { DatabaseModule } from '../config/database/database.module' +import { DatabaseModule } from '../database/database.module' import { JwtProvider } from '../jwt/jwt.provider' @Module({ diff --git a/server/src/members/application/email.checker.test.ts b/server/src/members/application/email.checker.test.ts index 9c870ec..b7f46fd 100644 --- a/server/src/members/application/email.checker.test.ts +++ b/server/src/members/application/email.checker.test.ts @@ -1,6 +1,6 @@ import { Test, TestingModule } from '@nestjs/testing' import { Connection } from 'mysql2/promise' -import { MYSQL_CONNECTION } from '../../config/database/constants' +import { MYSQL_CONNECTION } from '../../database/constants' import { MemberRepository } from '../domain/member.repository' import { EmailChecker } from './email.checker' import { AlreadyExistedEmailException } from './error/already-existed-email.exception' diff --git a/server/src/members/domain/member.repository.test.ts b/server/src/members/domain/member.repository.test.ts index 0aa56d4..862e89e 100644 --- a/server/src/members/domain/member.repository.test.ts +++ b/server/src/members/domain/member.repository.test.ts @@ -1,7 +1,7 @@ import { Test, TestingModule } from '@nestjs/testing' import { Connection, ResultSetHeader, RowDataPacket } from 'mysql2/promise' import { MemberRepository } from './member.repository' -import { MYSQL_CONNECTION } from '../../config/database/constants' +import { MYSQL_CONNECTION } from '../../database/constants' import { dbMemberMock, userMock } from '../../fixture/memberFixture' describe('MemberRepository class', () => { diff --git a/server/src/members/domain/member.repository.ts b/server/src/members/domain/member.repository.ts index 680af8e..feb8f9a 100644 --- a/server/src/members/domain/member.repository.ts +++ b/server/src/members/domain/member.repository.ts @@ -1,6 +1,6 @@ import { Connection, ResultSetHeader, RowDataPacket } from 'mysql2/promise' import { Inject } from '@nestjs/common' -import { MYSQL_CONNECTION } from '../../config/database/constants' +import { MYSQL_CONNECTION } from '../../database/constants' import { Member } from './member.entity' export class MemberRepository { diff --git a/server/src/members/member.module.ts b/server/src/members/member.module.ts index 95a9d3d..59da31e 100644 --- a/server/src/members/member.module.ts +++ b/server/src/members/member.module.ts @@ -1,7 +1,7 @@ import { Module } from '@nestjs/common' import { EmailChecker } from './application/email.checker' import { MemberRepository } from './domain/member.repository' -import { DatabaseModule } from '../config/database/database.module' +import { DatabaseModule } from '../database/database.module' import { PasswordProvider } from './application/password.provider' @Module({ diff --git a/server/test/item-create.e2e-spec.ts b/server/test/item-create.e2e-spec.ts index df0ce47..182a55b 100644 --- a/server/test/item-create.e2e-spec.ts +++ b/server/test/item-create.e2e-spec.ts @@ -16,7 +16,7 @@ import { ItemUpdateController } from '../src/items/web/item-update.controller' import { ItemDetailController } from '../src/items/web/item-detail.controller' import { ItemCreateController } from '../src/items/web/item-create.controller' import { ItemRepository } from '../src/items/domain/item.repository' -import { MYSQL_CONNECTION } from '../src/config/database/constants' +import { MYSQL_CONNECTION } from '../src/database/constants' import { Connection } from 'mysql2/promise' import { CreateItemRequest } from '../src/items/dto/save-item.dto' import { MemberRepository } from '../src/members/domain/member.repository' diff --git a/server/test/item-detail.e2e-spec.ts b/server/test/item-detail.e2e-spec.ts index 0f0bf03..5690408 100644 --- a/server/test/item-detail.e2e-spec.ts +++ b/server/test/item-detail.e2e-spec.ts @@ -9,7 +9,7 @@ import { ItemUpdateController } from '../src/items/web/item-update.controller' import { ItemDetailController } from '../src/items/web/item-detail.controller' import { ItemCreateController } from '../src/items/web/item-create.controller' import { ItemRepository } from '../src/items/domain/item.repository' -import { MYSQL_CONNECTION } from '../src/config/database/constants' +import { MYSQL_CONNECTION } from '../src/database/constants' import { Connection } from 'mysql2/promise' import { MemberRepository } from '../src/members/domain/member.repository' import { userMock } from '../src/fixture/memberFixture' diff --git a/server/test/item-update.e2e-spec.ts b/server/test/item-update.e2e-spec.ts index 5832edc..93f3e3a 100644 --- a/server/test/item-update.e2e-spec.ts +++ b/server/test/item-update.e2e-spec.ts @@ -15,7 +15,7 @@ import { ItemUpdateController } from '../src/items/web/item-update.controller' import { ItemDetailController } from '../src/items/web/item-detail.controller' import { ItemCreateController } from '../src/items/web/item-create.controller' import { ItemRepository } from '../src/items/domain/item.repository' -import { MYSQL_CONNECTION } from '../src/config/database/constants' +import { MYSQL_CONNECTION } from '../src/database/constants' import { Connection } from 'mysql2/promise' import { UpdateItemRequest } from '../src/items/dto/update-item.dto' import { MemberRepository } from '../src/members/domain/member.repository' diff --git a/server/test/signin.e2e-spec.ts b/server/test/signin.e2e-spec.ts index 1e3060a..c13a11c 100644 --- a/server/test/signin.e2e-spec.ts +++ b/server/test/signin.e2e-spec.ts @@ -2,7 +2,7 @@ import { Test, TestingModule } from '@nestjs/testing' import { INestApplication, ValidationPipe, BadRequestException, InternalServerErrorException } from '@nestjs/common' import * as request from 'supertest' import { MemberRepository } from '../src/members/domain/member.repository' -import { MYSQL_CONNECTION } from '../src/config/database/constants' +import { MYSQL_CONNECTION } from '../src/database/constants' import { Connection } from 'mysql2/promise' import { PasswordProvider } from '../src/members/application/password.provider' import { JwtProvider } from '../src/jwt/jwt.provider' diff --git a/server/test/signout.e2e-spec.ts b/server/test/signout.e2e-spec.ts index 1deec5c..bb6e1a4 100644 --- a/server/test/signout.e2e-spec.ts +++ b/server/test/signout.e2e-spec.ts @@ -2,7 +2,7 @@ import { Test, TestingModule } from '@nestjs/testing' import { INestApplication, UnauthorizedException, InternalServerErrorException } from '@nestjs/common' import * as request from 'supertest' import { MemberRepository } from '../src/members/domain/member.repository' -import { MYSQL_CONNECTION } from '../src/config/database/constants' +import { MYSQL_CONNECTION } from '../src/database/constants' import { Connection } from 'mysql2/promise' import { JwtProvider } from '../src/jwt/jwt.provider' import { SignoutController } from '../src/auth/signout/web/signout.controller' diff --git a/server/test/signup.e2e-spec.ts b/server/test/signup.e2e-spec.ts index 1263347..b713085 100644 --- a/server/test/signup.e2e-spec.ts +++ b/server/test/signup.e2e-spec.ts @@ -5,7 +5,7 @@ import { SignupController } from '../src/auth/signup/web/signup.controller' import { SignupService } from '../src/auth/signup/application/signup.service' import { EmailChecker } from '../src/members/application/email.checker' import { MemberRepository } from '../src/members/domain/member.repository' -import { MYSQL_CONNECTION } from '../src/config/database/constants' +import { MYSQL_CONNECTION } from '../src/database/constants' import { Connection } from 'mysql2/promise' import { userMock } from '../src/fixture/memberFixture' import { PasswordProvider } from '../src/members/application/password.provider' diff --git a/server/test/token.e2e-spec.ts b/server/test/token.e2e-spec.ts index a805b73..3530fa6 100644 --- a/server/test/token.e2e-spec.ts +++ b/server/test/token.e2e-spec.ts @@ -2,7 +2,7 @@ import { Test, TestingModule } from '@nestjs/testing' import { INestApplication, UnauthorizedException } from '@nestjs/common' import * as request from 'supertest' import { MemberRepository } from '../src/members/domain/member.repository' -import { MYSQL_CONNECTION } from '../src/config/database/constants' +import { MYSQL_CONNECTION } from '../src/database/constants' import { Connection } from 'mysql2/promise' import { JwtProvider } from '../src/jwt/jwt.provider' import { TokenController } from '../src/auth/token/web/token.controller'