This repository has been archived by the owner on Dec 30, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: coordination * refactor: modules * update code * feat: add auth guard when login * fix: user be overwrite * fix: migration * fix: hide some api property * feat: update person password * feata: export project * chore: update migration file * chore: docs * update code * chore: update docker config * refactor: remove api-key validator * feat: add username validator * chore: move file * fix: some dto validator * feat: add first user to default project * fix: import type * update code * fix: some entity * fix: some dto * chore: open api exception log * chore: release v1.8.0 Co-authored-by: buqiyuan <[email protected]>
- Loading branch information
Showing
121 changed files
with
3,844 additions
and
1,791 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,14 +1,20 @@ | ||
# auth token | ||
API_KEY=1ab2c3d4e5f61ab2c3d4e5f6 | ||
|
||
# eoapi-server coinfigure | ||
EOAPI_SERVER_PORT=3000 | ||
EOAPI_SERVER_PATH=/api | ||
|
||
# mysql configure | ||
TZ=Asia/Shanghai | ||
MYSQL_HOST=localhost | ||
MYSQL_HOST=host.docker.internal | ||
MYSQL_PORT=33066 | ||
MYSQL_USERNAME=root | ||
MYSQL_DATABASE=eoapi | ||
MYSQL_PASSWORD=123456a. | ||
MYSQL_ROOT_PASSWORD=123456a. | ||
|
||
# swagger | ||
SWAGGER_PATH=swagger-docs | ||
SWAGGER_ENABLE=true | ||
SWAGGER_VERSION=1.0 | ||
SWAGGER_TITLE=Eoapi-remote-server API文档 | ||
SWAGGER_DESC=Eoapi remote server API document。 | ||
|
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 @@ | ||
MYSQL_HOST=localhost |
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 |
---|---|---|
|
@@ -35,4 +35,7 @@ lerna-debug.log* | |
!.vscode/extensions.json | ||
|
||
# sample | ||
/sample | ||
/sample | ||
|
||
# env | ||
.env.prodction |
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,89 @@ | ||
{ | ||
"files.eol": "\n" | ||
"typescript.tsdk": "./node_modules/typescript/lib", | ||
"typescript.preferences.importModuleSpecifier": "non-relative", | ||
"npm.packageManager": "yarn", | ||
"editor.tabSize": 2, | ||
"editor.formatOnSave": true, | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"files.eol": "\n", | ||
"eslint.probe": [ | ||
"javascript", | ||
"typescript", | ||
"markdown", | ||
"json", | ||
"jsonc" | ||
], | ||
"eslint.validate": [ | ||
"javascript", | ||
"typescript", | ||
"markdown", | ||
"json", | ||
"jsonc" | ||
], | ||
"search.exclude": { | ||
"**/node_modules": true, | ||
"**/*.log": true, | ||
"**/*.log*": true, | ||
"**/bower_components": true, | ||
"**/dist": true, | ||
"**/elehukouben": true, | ||
"**/.git": true, | ||
"**/.gitignore": true, | ||
"**/.svn": true, | ||
"**/.DS_Store": true, | ||
"**/.idea": true, | ||
"**/.vscode": false, | ||
"**/yarn.lock": true, | ||
"**/tmp": true, | ||
"out": true, | ||
"dist": true, | ||
"node_modules": true, | ||
"CHANGELOG.md": true, | ||
"examples": true, | ||
"res": true, | ||
"screenshots": true, | ||
"yarn-error.log": true, | ||
"**/.yarn": true | ||
}, | ||
"files.exclude": { | ||
"**/.cache": true, | ||
"**/.editorconfig": true, | ||
"**/.eslintcache": true, | ||
"**/bower_components": true, | ||
"**/.idea": true, | ||
"**/tmp": true, | ||
"**/.git": true, | ||
"**/.svn": true, | ||
"**/.hg": true, | ||
"**/CVS": true, | ||
"**/.DS_Store": true | ||
}, | ||
"files.watcherExclude": { | ||
"**/.git/objects/**": true, | ||
"**/.git/subtree-cache/**": true, | ||
"**/.vscode/**": true, | ||
"**/node_modules/**": true, | ||
"**/tmp/**": true, | ||
"**/bower_components/**": true, | ||
"**/dist/**": true, | ||
"**/yarn.lock": true | ||
}, | ||
"path-intellisense.mappings": { | ||
"@/": "${workspaceRoot}/src" | ||
}, | ||
"[javascriptreact]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
}, | ||
"[typescript]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll.eslint": true | ||
} | ||
}, | ||
"[markdown]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
}, | ||
"[jsonc]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
}, | ||
} |
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,8 @@ | ||
{ | ||
"$schema": "https://json.schemastore.org/nest-cli", | ||
"collection": "@nestjs/schematics", | ||
"sourceRoot": "src" | ||
"sourceRoot": "src", | ||
"compilerOptions": { | ||
"plugins": ["@nestjs/swagger"] | ||
} | ||
} |
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,22 +1,20 @@ | ||
import { Controller, Get, UseGuards } from '@nestjs/common'; | ||
import { AuthGuard } from '@nestjs/passport'; | ||
import { Controller, Get } from '@nestjs/common'; | ||
import { AppService } from './app.service'; | ||
import { Public } from '@/common/decorators/public.decorator'; | ||
|
||
@Controller() | ||
export class AppController { | ||
constructor(private readonly appService: AppService) {} | ||
|
||
@Public() | ||
@Get() | ||
getHello(): string { | ||
return this.appService.getHello(); | ||
} | ||
|
||
@Get('system/status') | ||
@UseGuards(AuthGuard('api-key')) | ||
@Public() | ||
status() { | ||
return { | ||
statusCode: 200, | ||
data: 'success', | ||
}; | ||
return 'success'; | ||
} | ||
} |
Oops, something went wrong.