-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'release/R.5.2-Docs-Builder'
- Loading branch information
Showing
81 changed files
with
3,345 additions
and
577 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 |
---|---|---|
@@ -1,15 +1,16 @@ | ||
module.exports = { | ||
parser: "@typescript-eslint/parser", // Specifies the ESLint parser | ||
parser: '@typescript-eslint/parser', // Specifies the ESLint parser | ||
parserOptions: { | ||
ecmaVersion: 2020, // Allows for the parsing of modern ECMAScript features | ||
sourceType: "module" // Allows for the use of imports | ||
sourceType: 'module', // Allows for the use of imports | ||
}, | ||
extends: [ | ||
"plugin:@typescript-eslint/recommended", // Uses the recommended rules from the @typescript-eslint/eslint-plugin | ||
"prettier", // Uses eslint-config-prettier to disable ESLint rules from @typescript-eslint/eslint-plugin that would conflict with prettier | ||
'plugin:@typescript-eslint/recommended', // Uses the recommended rules from the @typescript-eslint/eslint-plugin | ||
'prettier/@typescript-eslint', | ||
'plugin:prettier/recommended', // Uses eslint-config-prettier to disable ESLint rules from @typescript-eslint/eslint-plugin that would conflict with prettier | ||
], | ||
rules: { | ||
// Place to specify ESLint rules. Can be used to overwrite rules specified from the extended configs | ||
// e.g. "@typescript-eslint/explicit-function-return-type": "off", | ||
} | ||
} | ||
}, | ||
}; |
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"name": "tsnode-rest-api-boilerplate", | ||
"version": "0.1.0", | ||
"description": "API Documentation", | ||
"title": "API Documentation - tsnode-rest-api-boilerplate", | ||
"url" : "", | ||
"template": { | ||
"showRequiredLabels": true | ||
} | ||
} |
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,3 +1,3 @@ | ||
export interface EventRequest { | ||
message: string; | ||
} | ||
} |
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,30 +1,30 @@ | ||
import { API_RESPONSE } from '../../core'; | ||
import { HttpResponse, HttpRequest } from '../../core/libs/ApiEvent'; | ||
import { Response } from 'express'; | ||
import { Database } from '../../core/databases/Mysql'; | ||
import { Connection } from 'typeorm'; | ||
|
||
import { API_RESPONSE } from "../../core"; | ||
import { HttpResponse, HttpRequest } from "../../core/libs/ApiEvent"; | ||
import { Response } from "express"; | ||
import { Database } from "../../core/databases/Mysql"; | ||
import { Connection } from "typeorm"; | ||
|
||
import { Response200 } from "./response"; | ||
import { Validate } from "./validate"; | ||
import { LoginAction } from "./action"; | ||
import { Response200 } from './response'; | ||
import { Validate } from './validate'; | ||
import { LoginAction } from './action'; | ||
|
||
export async function execute(req: HttpRequest, res: Response): Promise<HttpResponse> { | ||
try { | ||
const request = Validate(req.body); | ||
const connection: Connection = await Database.getConnection(); | ||
const connection: Connection = await Database.getConnection(); | ||
const action = new LoginAction(connection); | ||
const data = await action.execute(request); | ||
|
||
return API_RESPONSE({ | ||
...Response200.SUCCESS, | ||
...data, | ||
}, res); | ||
} | ||
catch(e) { | ||
|
||
return API_RESPONSE( | ||
{ | ||
...Response200.SUCCESS, | ||
...data, | ||
}, | ||
res, | ||
); | ||
} catch (e) { | ||
return API_RESPONSE(e, res); | ||
} | ||
finally { | ||
} finally { | ||
await Database.closeConnection(); | ||
} | ||
} |
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,5 +1,4 @@ | ||
|
||
export interface LoginRequest { | ||
username: string; | ||
password: string; | ||
} | ||
} |
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
Oops, something went wrong.