-
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
26 changed files
with
76 additions
and
77 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
6 changes: 3 additions & 3 deletions
6
packages/api/src/core/mapper.ts → packages/api/src/core/auto-mapper/mapper.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 was deleted.
Oops, something went wrong.
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,13 @@ | ||
import { DataSource } from 'typeorm'; | ||
import { Game } from '../../features/game/game.entity'; | ||
import { User } from '../../features/user/user.entity'; | ||
import { Auth } from '../../features/auth/auth.entity'; | ||
import { Card } from '../../features/card/card.entity'; | ||
|
||
export const appDataSource = new DataSource({ | ||
type: 'sqlite', | ||
database: 'sqlite.db', | ||
entities: [User, Auth, Game, Card], | ||
synchronize: true, | ||
logging: false, | ||
}); |
File renamed without changes.
This file was deleted.
Oops, something went wrong.
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 { ConfigFunction } from 'inversify-express-utils'; | ||
|
||
export const configFunction: ConfigFunction = () => {}; |
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,28 @@ | ||
import '../../features/auth/auth.controller'; | ||
import '../../features/card/card.controller'; | ||
import '../../features/game/game.controller'; | ||
import '../../features/user/user.controller'; | ||
|
||
import { Container } from 'inversify'; | ||
import { BaseMiddleware } from 'inversify-express-utils'; | ||
import { AuthMiddleware } from '../../features/auth/auth.middleware'; | ||
import { AuthService } from '../../features/auth/auth.service'; | ||
import { IAuthService } from '../../features/auth/auth.service.type'; | ||
import { CardService } from '../../features/card/card.service'; | ||
import { ICardService } from '../../features/card/card.service.type'; | ||
import { GameServiceMock } from '../../features/game/game.service.mock'; | ||
import { IGameService } from '../../features/game/game.service.type'; | ||
import { UserService } from '../../features/user/user.service'; | ||
import { IUserService } from '../../features/user/user.service.type'; | ||
import { Middleware, Services } from './identifiers'; | ||
|
||
const container = new Container(); | ||
|
||
container.bind<BaseMiddleware>(Middleware.Auth).to(AuthMiddleware); | ||
|
||
container.bind<IAuthService>(Services.Auth).to(AuthService); | ||
container.bind<ICardService>(Services.Card).to(CardService); | ||
container.bind<IGameService>(Services.Game).to(GameServiceMock); | ||
container.bind<IUserService>(Services.User).to(UserService); | ||
|
||
export { container }; |
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
packages/api/src/core/crud.service.ts → ...ges/api/src/core/services/crud.service.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
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
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,4 +1,4 @@ | ||
import { appDataSource } from '../../core/app-data-source'; | ||
import { appDataSource } from '../../core/db/app-data-source'; | ||
import { Card } from './card.entity'; | ||
|
||
export const cardRepository = appDataSource.getRepository(Card); |
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,4 +1,4 @@ | ||
import { CardDto } from '@tspark/common'; | ||
import { ICrudService } from '../../core/crud.service.type'; | ||
import { ICrudService } from '../../core/services/crud.service.type'; | ||
|
||
export interface ICardService extends ICrudService<CardDto> {} |
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,4 +1,4 @@ | ||
import { appDataSource } from '../../core/app-data-source'; | ||
import { appDataSource } from '../../core/db/app-data-source'; | ||
import { Game } from './game.entity'; | ||
|
||
export const gameRepository = appDataSource.getRepository(Game); |
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,4 +1,4 @@ | ||
import { appDataSource } from '../../core/app-data-source'; | ||
import { appDataSource } from '../../core/db/app-data-source'; | ||
import { User } from './user.entity'; | ||
|
||
export const userRepository = appDataSource.getRepository(User); |
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