Cleanup: Renamed the creation folder to the more fitting "actions"
ref #11 #13
This commit is contained in:
		| @@ -2,9 +2,9 @@ import { Body, JsonController, Post } from 'routing-controllers'; | ||||
| import { OpenAPI, ResponseSchema } from 'routing-controllers-openapi'; | ||||
| import { IllegalJWTError, InvalidCredentialsError, JwtNotProvidedError, PasswordNeededError, RefreshTokenCountInvalidError, UsernameOrEmailNeededError } from '../errors/AuthError'; | ||||
| import { UserNotFoundError } from '../errors/UserErrors'; | ||||
| import { CreateAuth } from '../models/creation/CreateAuth'; | ||||
| import { HandleLogout } from '../models/creation/HandleLogout'; | ||||
| import { RefreshAuth } from '../models/creation/RefreshAuth'; | ||||
| import { CreateAuth } from '../models/actions/CreateAuth'; | ||||
| import { HandleLogout } from '../models/actions/HandleLogout'; | ||||
| import { RefreshAuth } from '../models/actions/RefreshAuth'; | ||||
| import { Auth } from '../models/responses/Auth'; | ||||
| import { Logout } from '../models/responses/Logout'; | ||||
|  | ||||
|   | ||||
| @@ -3,7 +3,7 @@ import { OpenAPI, ResponseSchema } from 'routing-controllers-openapi'; | ||||
| import { getConnectionManager, Repository } from 'typeorm'; | ||||
| import { EntityFromBody, EntityFromParam } from 'typeorm-routing-controllers-extensions'; | ||||
| import { RunnerGroupNeededError, RunnerGroupNotFoundError, RunnerIdsNotMatchingError, RunnerNotFoundError, RunnerOnlyOneGroupAllowedError } from '../errors/RunnerErrors'; | ||||
| import { CreateRunner } from '../models/creation/CreateRunner'; | ||||
| import { CreateRunner } from '../models/actions/CreateRunner'; | ||||
| import { Runner } from '../models/entities/Runner'; | ||||
| import { ResponseRunner } from '../models/responses/ResponseRunner'; | ||||
|  | ||||
|   | ||||
| @@ -3,7 +3,7 @@ import { OpenAPI, ResponseSchema } from 'routing-controllers-openapi'; | ||||
| import { getConnectionManager, Repository } from 'typeorm'; | ||||
| import { EntityFromBody, EntityFromParam } from 'typeorm-routing-controllers-extensions'; | ||||
| import { RunnerOrganisationHasRunnersError, RunnerOrganisationHasTeamsError, RunnerOrganisationIdsNotMatchingError, RunnerOrganisationNotFoundError } from '../errors/RunnerOrganisationErrors'; | ||||
| import { CreateRunnerOrganisation } from '../models/creation/CreateRunnerOrganisation'; | ||||
| import { CreateRunnerOrganisation } from '../models/actions/CreateRunnerOrganisation'; | ||||
| import { RunnerOrganisation } from '../models/entities/RunnerOrganisation'; | ||||
| import { ResponseRunnerOrganisation } from '../models/responses/ResponseRunnerOrganisation'; | ||||
| import { RunnerController } from './RunnerController'; | ||||
|   | ||||
| @@ -3,7 +3,7 @@ import { OpenAPI, ResponseSchema } from 'routing-controllers-openapi'; | ||||
| import { getConnectionManager, Repository } from 'typeorm'; | ||||
| import { EntityFromBody, EntityFromParam } from 'typeorm-routing-controllers-extensions'; | ||||
| import { RunnerTeamHasRunnersError, RunnerTeamIdsNotMatchingError, RunnerTeamNotFoundError } from '../errors/RunnerTeamErrors'; | ||||
| import { CreateRunnerTeam } from '../models/creation/CreateRunnerTeam'; | ||||
| import { CreateRunnerTeam } from '../models/actions/CreateRunnerTeam'; | ||||
| import { RunnerTeam } from '../models/entities/RunnerTeam'; | ||||
| import { ResponseRunnerTeam } from '../models/responses/ResponseRunnerTeam'; | ||||
| import { RunnerController } from './RunnerController'; | ||||
|   | ||||
| @@ -3,7 +3,7 @@ import { OpenAPI, ResponseSchema } from 'routing-controllers-openapi'; | ||||
| import { getConnectionManager, Repository } from 'typeorm'; | ||||
| import { EntityFromBody, EntityFromParam } from 'typeorm-routing-controllers-extensions'; | ||||
| import { TrackIdsNotMatchingError, TrackNotFoundError } from "../errors/TrackErrors"; | ||||
| import { CreateTrack } from '../models/creation/CreateTrack'; | ||||
| import { CreateTrack } from '../models/actions/CreateTrack'; | ||||
| import { Track } from '../models/entities/Track'; | ||||
| import { ResponseTrack } from '../models/responses/ResponseTrack'; | ||||
|  | ||||
|   | ||||
| @@ -3,7 +3,7 @@ import { OpenAPI, ResponseSchema } from 'routing-controllers-openapi'; | ||||
| import { getConnectionManager, Repository } from 'typeorm'; | ||||
| import { EntityFromBody, EntityFromParam } from 'typeorm-routing-controllers-extensions'; | ||||
| import { UserGroupNotFoundError, UserIdsNotMatchingError, UserNotFoundError } from '../errors/UserErrors'; | ||||
| import { CreateUser } from '../models/creation/CreateUser'; | ||||
| import { CreateUser } from '../models/actions/CreateUser'; | ||||
| import { User } from '../models/entities/User'; | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -3,7 +3,7 @@ import { OpenAPI, ResponseSchema } from 'routing-controllers-openapi'; | ||||
| import { getConnectionManager, Repository } from 'typeorm'; | ||||
| import { EntityFromBody, EntityFromParam } from 'typeorm-routing-controllers-extensions'; | ||||
| import { UserGroupIdsNotMatchingError, UserGroupNotFoundError } from '../errors/UserGroupErrors'; | ||||
| import { CreateUserGroup } from '../models/creation/CreateUserGroup'; | ||||
| import { CreateUserGroup } from '../models/actions/CreateUserGroup'; | ||||
| import { UserGroup } from '../models/entities/UserGroup'; | ||||
|  | ||||
|  | ||||
|   | ||||
							
								
								
									
										23
									
								
								src/tests.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								src/tests.ts
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,23 @@ | ||||
| import * as dotenvSafe from "dotenv-safe"; | ||||
| import "reflect-metadata"; | ||||
| import { createExpressServer } from "routing-controllers"; | ||||
| import authchecker from "./authchecker"; | ||||
| import loaders from "./loaders/index"; | ||||
| import { ErrorHandler } from './middlewares/ErrorHandler'; | ||||
|  | ||||
| dotenvSafe.config(); | ||||
| const PORT = process.env.APP_PORT || 4010; | ||||
|  | ||||
| const app = createExpressServer({ | ||||
|     authorizationChecker: authchecker, | ||||
|     middlewares: [ErrorHandler], | ||||
|     development: process.env.NODE_ENV === "production", | ||||
|     cors: true, | ||||
|     routePrefix: "/api", | ||||
|     controllers: [__dirname + "/controllers/*.ts"], | ||||
| }); | ||||
|  | ||||
| async function main() { | ||||
|     await loaders(app); | ||||
| } | ||||
| main(); | ||||
		Reference in New Issue
	
	Block a user