|
|
@@ -7,7 +7,6 @@ import { InstallerService } from '~/services/InstallerService';
|
|
|
|
|
|
const isOfficialMode = process.env.OFFICIAL_MODE === 'true';
|
|
|
|
|
|
-
|
|
|
@Controller('/')
|
|
|
export class TopCtrl {
|
|
|
|
|
|
@@ -22,7 +21,11 @@ export class TopCtrl {
|
|
|
scopes: requiredScopes,
|
|
|
});
|
|
|
|
|
|
- return { url, isOfficialMode };
|
|
|
+ // use await import in order to avoid typescript-eslint error
|
|
|
+ const fs = await import('fs');
|
|
|
+ const growiBotVersion = JSON.parse(fs.readFileSync('../../package.json', 'utf8')).version;
|
|
|
+
|
|
|
+ return { url, isOfficialMode, growiBotVersion };
|
|
|
}
|
|
|
|
|
|
}
|