mirror of
https://github.com/CaramelFur/Picsur.git
synced 2026-05-06 19:46:22 +02:00
Test some stuff
This commit is contained in:
@@ -3,7 +3,7 @@ import { ConfigService } from '@nestjs/config';
|
||||
import {
|
||||
ParseBool,
|
||||
ParseInt,
|
||||
ParseString,
|
||||
ParseString
|
||||
} from 'picsur-shared/dist/util/parse-simple';
|
||||
import { EnvPrefix } from '../config.static';
|
||||
|
||||
@@ -16,8 +16,15 @@ export class HostConfigService {
|
||||
this.logger.log('Verbose: ' + this.isVerbose());
|
||||
this.logger.log('Host: ' + this.getHost());
|
||||
this.logger.log('Port: ' + this.getPort());
|
||||
this.logger.log('Demo: ' + this.isDemo());
|
||||
this.logger.log('Demo Interval: ' + this.getDemoInterval() / 1000 + 's');
|
||||
|
||||
if (this.isDemo()) {
|
||||
this.logger.log('Running in demo mode');
|
||||
this.logger.log('Demo Interval: ' + this.getDemoInterval() / 1000 + 's');
|
||||
}
|
||||
|
||||
if (!this.isTelemetry()) {
|
||||
this.logger.log('Telemetry disabled');
|
||||
}
|
||||
}
|
||||
|
||||
public getHost(): string {
|
||||
@@ -47,6 +54,10 @@ export class HostConfigService {
|
||||
return ParseBool(this.configService.get(`${EnvPrefix}VERBOSE`), false);
|
||||
}
|
||||
|
||||
public isTelemetry() {
|
||||
return ParseBool(this.configService.get(`${EnvPrefix}TELEMETRY`), true);
|
||||
}
|
||||
|
||||
public getVersion() {
|
||||
return ParseString(this.configService.get(`npm_package_version`), '0.0.0');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user