-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
87 changed files
with
190 additions
and
132 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import UpdateUserCommandHandler from '@src/account/application/user/command/updateUserCommandHandler'; | ||
import SignupUserCommandHandler from '@src/account/application/auth/command/signupUserCommandHandler'; | ||
|
||
export const commands = [SignupUserCommandHandler, UpdateUserCommandHandler]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import RefreshTokenPostController from '@src/account/app/controllers/v1/auth/refreshTokenPostController'; | ||
import UserPutController from '@src/account/app/controllers/v1/user/userPutController'; | ||
import SignupPostController from '@src/account/app/controllers/v1/auth/signupPostController'; | ||
import LoginPostController from '@src/account/app/controllers/v1/auth/loginPostController'; | ||
import MeGetController from '@src/account/app/controllers/v1/auth/meGetController'; | ||
import UserGetController from '@src/account/app/controllers/v1/user/userGetController'; | ||
|
||
export const controllers = [ | ||
LoginPostController, | ||
SignupPostController, | ||
RefreshTokenPostController, | ||
MeGetController, | ||
UserGetController, | ||
UserPutController, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { UserSchema } from '@src/account/infrastructure/persistence/mikroOrm/entities/user'; | ||
|
||
export const entitySchemas = [UserSchema]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import FindUserQueryHandler from '@src/account/application/user/query/findUserQueryHandler'; | ||
import GetUserSocialLoginQueryHandler from '@src/account/application/auth/query/getUserSocialLoginQueryHandler'; | ||
|
||
export const queries = [GetUserSocialLoginQueryHandler, FindUserQueryHandler]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { USER_REPOSITORY } from '@src/account/domain/user/userRepository'; | ||
|
||
import MikroOrmUserRepository from '@src/account/infrastructure/persistence/mikroOrm/repositories/mikroOrmUserRepository'; | ||
|
||
export const repositories = [ | ||
{ | ||
provide: USER_REPOSITORY, | ||
useClass: MikroOrmUserRepository, | ||
}, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { Module } from '@nestjs/common'; | ||
import { MikroOrmModule } from '@mikro-orm/nestjs'; | ||
import mikroOrmConfiguration from './infrastructure/persistence/mikroOrm/config'; | ||
import { entitySchemas } from '@src/account/_dependencyInjection/entitySchemas'; | ||
import { controllers } from '@src/account/_dependencyInjection/controllers'; | ||
import { commands } from '@src/account/_dependencyInjection/commandHandlers'; | ||
import { queries } from '@src/account/_dependencyInjection/queryHandlers'; | ||
import { repositories } from '@src/account/_dependencyInjection/repositories'; | ||
|
||
@Module({ | ||
imports: [MikroOrmModule.forRoot(mikroOrmConfiguration), MikroOrmModule.forFeature(entitySchemas)], | ||
exports: [], | ||
controllers: [...controllers], | ||
providers: [...commands, ...queries, ...repositories], | ||
}) | ||
export class AccountModule {} |
2 changes: 1 addition & 1 deletion
2
...ontrollers/v1/auth/loginPostController.ts → ...ontrollers/v1/auth/loginPostController.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions
4
...ntrollers/v1/auth/signupPostController.ts → ...ntrollers/v1/auth/signupPostController.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
10 changes: 5 additions & 5 deletions
10
.../auth/command/signupUserCommandHandler.ts → .../auth/command/signupUserCommandHandler.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions
8
.../user/command/updateUserCommandHandler.ts → .../user/command/updateUserCommandHandler.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
4 changes: 2 additions & 2 deletions
4
...cation/user/query/findUserQueryHandler.ts → ...cation/user/query/findUserQueryHandler.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...pplication/user/query/findUserResponse.ts → ...pplication/user/query/findUserResponse.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
src/languages/domain/user/user.ts → src/account/domain/user/user.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import { Migrator } from '@mikro-orm/migrations'; | ||
import { defineConfig, PostgreSqlDriver } from '@mikro-orm/postgresql'; | ||
|
||
import { config as loadEnv } from 'dotenv'; | ||
import dotenvExpand from 'dotenv-expand'; | ||
import path from 'path'; | ||
import { entitySchemas } from '@src/account/_dependencyInjection/entitySchemas'; | ||
|
||
const env = loadEnv(); | ||
dotenvExpand.expand(env); | ||
|
||
const migrationPath = path.join(__dirname, '/migrations'); | ||
|
||
export default defineConfig({ | ||
entities: entitySchemas, | ||
entitiesTs: entitySchemas, | ||
driver: PostgreSqlDriver, | ||
clientUrl: process.env.POSTGRESQL_DB_URL, | ||
debug: process.env.ENV != 'production', | ||
extensions: [Migrator], | ||
ignoreUndefinedInQuery: true, | ||
forceUndefined: false, | ||
migrations: { | ||
path: migrationPath, | ||
glob: '!(*.d).{js,ts}', | ||
pathTs: migrationPath, | ||
tableName: 'mikro_orm_migrations', | ||
transactional: true, | ||
allOrNothing: true, | ||
snapshot: false, | ||
}, | ||
}); |
6 changes: 3 additions & 3 deletions
6
...ure/persistence/mikroOrm/entities/user.ts → ...ure/persistence/mikroOrm/entities/user.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
6 changes: 3 additions & 3 deletions
6
...rm/repositories/mikroOrmUserRepository.ts → ...rm/repositories/mikroOrmUserRepository.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
import { Module } from '@nestjs/common'; | ||
import { LanguageModule } from './languages/language.module'; | ||
import { SharedModule } from './shared/shared.module'; | ||
import { AccountModule } from '@src/account/account.module'; | ||
|
||
@Module({ | ||
imports: [SharedModule, LanguageModule], | ||
imports: [SharedModule, AccountModule, LanguageModule], | ||
}) | ||
export class AppModule {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
import { CountrySchema } from '@src/languages/infrastructure/persistence/mikroOrm/entities/country'; | ||
import { ExpressionSchema } from '@src/languages/infrastructure/persistence/mikroOrm/entities/expression'; | ||
import { TermSchema } from '@src/languages/infrastructure/persistence/mikroOrm/entities/term'; | ||
import { UserSchema } from '@src/languages/infrastructure/persistence/mikroOrm/entities/user'; | ||
import { WordSchema } from '@src/languages/infrastructure/persistence/mikroOrm/entities/word'; | ||
|
||
export const entitySchemas = [UserSchema, CountrySchema, TermSchema, ExpressionSchema, WordSchema]; | ||
export const entitySchemas = [CountrySchema, TermSchema, ExpressionSchema, WordSchema]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,13 @@ | ||
import FindCountryQueryHandler from '@src/languages/application/country/query/findCountryQueryHandler'; | ||
import FindCountriesQueryHandler from '@src/languages/application/country/query/findCountriesQueryHandler'; | ||
import SearchTermQueryHandler from '@src/languages/application/term/query/searchTermQueryHandler'; | ||
import FindUserQueryHandler from '@src/languages/application/user/query/findUserQueryHandler'; | ||
import FindSuggestionsTermQueryHandler from '@src/languages/application/term/query/findSuggestionsTermQueryHandler'; | ||
import FindTermQueryHandler from '@src/languages/application/term/query/findTermQueryHandler'; | ||
import GetUserSocialLoginQueryHandler from '@src/languages/application/auth/query/getUserSocialLoginQueryHandler'; | ||
|
||
export const queries = [ | ||
GetUserSocialLoginQueryHandler, | ||
FindCountryQueryHandler, | ||
FindCountriesQueryHandler, | ||
SearchTermQueryHandler, | ||
FindUserQueryHandler, | ||
FindSuggestionsTermQueryHandler, | ||
FindTermQueryHandler, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
src/languages/application/term/command/addLikeTermCommandHandler.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.