mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-17 18:21:28 +10:00
run prettier formatting on all files
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
|
||||
@ -20,7 +20,7 @@ export class AuthService {
|
||||
private schedulerRegistry: SchedulerRegistry,
|
||||
private configService: ConfigService,
|
||||
private usersService: UsersService,
|
||||
private jwtService: JwtService
|
||||
private jwtService: JwtService,
|
||||
) {}
|
||||
|
||||
async register(registerDto: RegisterDto) {
|
||||
@ -49,7 +49,7 @@ export class AuthService {
|
||||
if (!isPasswordMatching) {
|
||||
throw new HttpException(
|
||||
'The username/email and password combination provided was incorrect.',
|
||||
HttpStatus.UNAUTHORIZED
|
||||
HttpStatus.UNAUTHORIZED,
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -64,7 +64,7 @@ export class AuthService {
|
||||
} catch (error) {
|
||||
throw new HttpException(
|
||||
'The username/email and password combination provided was incorrect.',
|
||||
HttpStatus.UNAUTHORIZED
|
||||
HttpStatus.UNAUTHORIZED,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -8,7 +8,10 @@ import { UsersService } from '@/users/users.service';
|
||||
|
||||
@Injectable()
|
||||
export class JwtStrategy extends PassportStrategy(Strategy) {
|
||||
constructor(configService: ConfigService, private readonly usersService: UsersService) {
|
||||
constructor(
|
||||
configService: ConfigService,
|
||||
private readonly usersService: UsersService,
|
||||
) {
|
||||
super({
|
||||
jwtFromRequest: ExtractJwt.fromAuthHeaderAsBearerToken(),
|
||||
secretOrKey: configService.get('auth.jwtSecret'),
|
||||
|
||||
@ -9,7 +9,10 @@ import cachedResponse from './assets/cachedResponse.json';
|
||||
|
||||
@Injectable()
|
||||
export class FontsService {
|
||||
constructor(private configService: ConfigService, private httpService: HttpService) {}
|
||||
constructor(
|
||||
private configService: ConfigService,
|
||||
private httpService: HttpService,
|
||||
) {}
|
||||
|
||||
async getAll(): Promise<Font[]> {
|
||||
const apiKey = this.configService.get('google.apiKey');
|
||||
|
||||
@ -6,7 +6,7 @@ export class HealthController {
|
||||
constructor(
|
||||
private health: HealthCheckService,
|
||||
private http: HttpHealthIndicator,
|
||||
private db: TypeOrmHealthIndicator
|
||||
private db: TypeOrmHealthIndicator,
|
||||
) {}
|
||||
|
||||
@Get()
|
||||
|
||||
@ -10,7 +10,7 @@ export class PrinterController {
|
||||
async printAsPdf(
|
||||
@Param('username') username: string,
|
||||
@Param('slug') slug: string,
|
||||
@Query('lastUpdated') lastUpdated: string
|
||||
@Query('lastUpdated') lastUpdated: string,
|
||||
): Promise<string> {
|
||||
try {
|
||||
return await this.printerService.printAsPdf(username, slug, lastUpdated);
|
||||
|
||||
@ -49,7 +49,10 @@ const minimal_chromium_args = [
|
||||
export class PrinterService implements OnModuleInit, OnModuleDestroy {
|
||||
private browser: BrowserContext;
|
||||
|
||||
constructor(private readonly schedulerRegistry: SchedulerRegistry, private readonly configService: ConfigService) {}
|
||||
constructor(
|
||||
private readonly schedulerRegistry: SchedulerRegistry,
|
||||
private readonly configService: ConfigService,
|
||||
) {}
|
||||
|
||||
async onModuleInit() {
|
||||
this.browser = await chromium.launchPersistentContext('.playwright', {
|
||||
@ -84,7 +87,7 @@ export class PrinterService implements OnModuleInit, OnModuleDestroy {
|
||||
this.schedulerRegistry.deleteTimeout(`delete-${file}`);
|
||||
}
|
||||
}
|
||||
})
|
||||
}),
|
||||
);
|
||||
});
|
||||
|
||||
@ -99,7 +102,7 @@ export class PrinterService implements OnModuleInit, OnModuleDestroy {
|
||||
|
||||
const pageFormat: PageConfig['format'] = await page.$$eval(
|
||||
'[data-page]',
|
||||
(pages) => pages[0].getAttribute('data-format') as PageConfig['format']
|
||||
(pages) => pages[0].getAttribute('data-format') as PageConfig['format'],
|
||||
);
|
||||
|
||||
const resumePages = await page.$$eval('[data-page]', (pages) =>
|
||||
@ -107,7 +110,7 @@ export class PrinterService implements OnModuleInit, OnModuleDestroy {
|
||||
pageNumber: index + 1,
|
||||
innerHTML: page.innerHTML,
|
||||
height: page.clientHeight,
|
||||
}))
|
||||
})),
|
||||
);
|
||||
|
||||
const pdf = await PDFDocument.create();
|
||||
|
||||
@ -43,7 +43,7 @@ export class ResumeController {
|
||||
findOneByShortId(
|
||||
@Param('shortId') shortId: string,
|
||||
@User('id') userId?: number,
|
||||
@Query('secretKey') secretKey?: string
|
||||
@Query('secretKey') secretKey?: string,
|
||||
) {
|
||||
return this.resumeService.findOneByShortId(shortId, userId, secretKey);
|
||||
}
|
||||
@ -54,7 +54,7 @@ export class ResumeController {
|
||||
@Param('username') username: string,
|
||||
@Param('slug') slug: string,
|
||||
@User('id') userId?: number,
|
||||
@Query('secretKey') secretKey?: string
|
||||
@Query('secretKey') secretKey?: string,
|
||||
) {
|
||||
return this.resumeService.findOneByIdentifier(username, slug, userId, secretKey);
|
||||
}
|
||||
|
||||
@ -19,7 +19,7 @@ export class UsersService {
|
||||
@InjectRepository(User) private userRepository: Repository<User>,
|
||||
private schedulerRegistry: SchedulerRegistry,
|
||||
private mailService: MailService,
|
||||
private dataSource: DataSource
|
||||
private dataSource: DataSource,
|
||||
) {}
|
||||
|
||||
async findById(id: number): Promise<User> {
|
||||
@ -115,7 +115,7 @@ export class UsersService {
|
||||
|
||||
throw new HttpException(
|
||||
'Please wait at least 30 minutes before resetting your password again.',
|
||||
HttpStatus.TOO_MANY_REQUESTS
|
||||
HttpStatus.TOO_MANY_REQUESTS,
|
||||
);
|
||||
} finally {
|
||||
await queryRunner.release();
|
||||
|
||||
Reference in New Issue
Block a user