Browse Source
Task/implement OnModuleInit interface in AssetsController (#6451)
* Implement OnModuleInit interface
pull/6497/head
Thomas Kaul
1 week ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
5 additions and
2 deletions
-
apps/api/src/app/endpoints/assets/assets.controller.ts
|
|
|
@ -4,6 +4,7 @@ import { interpolate } from '@ghostfolio/common/helper'; |
|
|
|
import { |
|
|
|
Controller, |
|
|
|
Get, |
|
|
|
OnModuleInit, |
|
|
|
Param, |
|
|
|
Res, |
|
|
|
Version, |
|
|
|
@ -14,12 +15,14 @@ import { readFileSync } from 'node:fs'; |
|
|
|
import { join } from 'node:path'; |
|
|
|
|
|
|
|
@Controller('assets') |
|
|
|
export class AssetsController { |
|
|
|
export class AssetsController implements OnModuleInit { |
|
|
|
private webManifest = ''; |
|
|
|
|
|
|
|
public constructor( |
|
|
|
public readonly configurationService: ConfigurationService |
|
|
|
) { |
|
|
|
) {} |
|
|
|
|
|
|
|
public onModuleInit() { |
|
|
|
try { |
|
|
|
this.webManifest = readFileSync( |
|
|
|
join(__dirname, 'assets', 'site.webmanifest'), |
|
|
|
|