Skip to content

Commit 24f038c

Browse files
committed
lint fix
1 parent 22dc3b8 commit 24f038c

File tree

2 files changed

+39
-41
lines changed

2 files changed

+39
-41
lines changed

src/core/auth/auth.service.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ForbiddenException, Injectable, Logger, OnModuleInit, UnauthorizedException } from '@nestjs/common';
1+
import { ForbiddenException, Injectable, OnModuleInit, UnauthorizedException } from '@nestjs/common';
22
import { AbstractService } from '~/_common/abstracts/abstract.service';
33
import { ModuleRef } from '@nestjs/core';
44
import { Redis } from 'ioredis';
@@ -37,30 +37,30 @@ export class AuthService extends AbstractService implements OnModuleInit {
3737

3838
public async onModuleInit(): Promise<void> {
3939
if (process.env.NODE_ENV !== 'production') {
40-
this.logger.warn('DEV MODE ENABLED !')
41-
const devTokenPath = resolve(process.cwd(), this.DEV_TOKEN_PATH)
40+
this.logger.warn('DEV MODE ENABLED !');
41+
const devTokenPath = resolve(process.cwd(), this.DEV_TOKEN_PATH);
4242
if (existsSync(devTokenPath)) {
4343
try {
44-
const data = JSON.parse(readFileSync(devTokenPath, 'utf-8'))
44+
const data = JSON.parse(readFileSync(devTokenPath, 'utf-8'));
4545
if (data.access_token) {
46-
this.logger.log(`TOKEN ALREADY EXIST : <${data.access_token}>`)
47-
return
46+
this.logger.log(`TOKEN ALREADY EXIST : <${data.access_token}>`);
47+
return;
4848
}
4949
} catch (e) {
50-
this.logger.error(`TOKEN FILE CORRUPTED ! REGENERATING...`)
50+
this.logger.error(`TOKEN FILE CORRUPTED ! REGENERATING...`);
5151
}
5252
}
5353
const { access_token } = await this.createTokens(new ConsoleSession(), false, {
5454
expiresIn: '1y',
55-
})
55+
});
5656
writeFileSync(
5757
devTokenPath,
5858
JSON.stringify({
5959
access_token,
6060
}),
61-
)
61+
);
6262

63-
this.logger.log(`NEW TOKEN CREATED : <${access_token}>`)
63+
this.logger.log(`NEW TOKEN CREATED : <${access_token}>`);
6464
}
6565
}
6666

src/core/logger/internal.logger.ts

Lines changed: 29 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,37 @@
11
import { ConsoleLogger } from '@nestjs/common';
22

33
export class InternalLogger extends ConsoleLogger {
4-
54
public constructor() {
65
super();
7-
8-
}
9-
10-
error(message: any, stack?: string, context?: string) {
11-
// @ts-ignore
12-
super.error(...arguments);
136
}
147

15-
warn(message: any, context?: string) {
16-
// @ts-ignore
17-
super.warn(...arguments);
18-
}
19-
20-
log(message: any, context?: string) {
21-
// @ts-ignore
22-
super.log(...arguments);
23-
}
24-
25-
debug(message: any, context?: string) {
26-
// @ts-ignore
27-
super.debug(...arguments);
28-
}
29-
30-
verbose(message: any, context?: string) {
31-
// @ts-ignore
32-
super.verbose(...arguments);
33-
}
34-
35-
fatal(message: any, context?: string) {
36-
// @ts-ignore
37-
super.error(...arguments);
38-
}
8+
// error(message: any, stack?: string, context?: string) {
9+
// // @ts-ignore
10+
// super.error(...arguments);
11+
// }
12+
//
13+
// warn(message: any, context?: string) {
14+
// // @ts-ignore
15+
// super.warn(...arguments);
16+
// }
17+
//
18+
// log(message: any, context?: string) {
19+
// // @ts-ignore
20+
// super.log(...arguments);
21+
// }
22+
//
23+
// debug(message: any, context?: string) {
24+
// // @ts-ignore
25+
// super.debug(...arguments);
26+
// }
27+
//
28+
// verbose(message: any, context?: string) {
29+
// // @ts-ignore
30+
// super.verbose(...arguments);
31+
// }
32+
//
33+
// fatal(message: any, context?: string) {
34+
// // @ts-ignore
35+
// super.error(...arguments);
36+
// }
3937
}

0 commit comments

Comments
 (0)