mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 04:48:53 +00:00
refactor(server): config system (#11081)
This commit is contained in:
@@ -1,21 +1,19 @@
|
||||
import { Controller, Get } from '@nestjs/common';
|
||||
|
||||
import { Config, SkipThrottle } from './base';
|
||||
import { SkipThrottle } from './base';
|
||||
import { Public } from './core/auth';
|
||||
|
||||
@Controller('/info')
|
||||
export class AppController {
|
||||
constructor(private readonly config: Config) {}
|
||||
|
||||
@SkipThrottle()
|
||||
@Public()
|
||||
@Get()
|
||||
info() {
|
||||
return {
|
||||
compatibility: this.config.version,
|
||||
message: `AFFiNE ${this.config.version} Server`,
|
||||
type: this.config.type,
|
||||
flavor: this.config.flavor.type,
|
||||
compatibility: env.version,
|
||||
message: `AFFiNE ${env.version} Server`,
|
||||
type: env.DEPLOYMENT_TYPE,
|
||||
flavor: env.FLAVOR,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user