|
|
@@ -1,13 +1,20 @@
|
|
|
-import { Controller, Get } from '@tsed/common';
|
|
|
+import { Controller, PlatformRouter } from '@tsed/common';
|
|
|
+import { Request, Response } from 'express';
|
|
|
|
|
|
const isOfficialMode = process.env.OFFICIAL_MODE === 'true';
|
|
|
|
|
|
@Controller('/privacy')
|
|
|
export class SlackCtrl {
|
|
|
|
|
|
- @Get('/')
|
|
|
- async install(): Promise<string> {
|
|
|
- return 'Privary Policy';
|
|
|
+ constructor(router: PlatformRouter) {
|
|
|
+ if (isOfficialMode) {
|
|
|
+ router.get('/', this.getPrivacy);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
|
+ getPrivacy(req: Request, res: Response): string|void {
|
|
|
+ res.send('Privary Policy');
|
|
|
}
|
|
|
|
|
|
}
|