chore: fix linting (#544)

* fix: eslint (server)

* fix: eslint (client)

* commit package lock file

* fix linting
This commit is contained in:
Philip Okugbe
2024-12-09 14:51:31 +00:00
committed by GitHub
parent e6bf4cdd6c
commit 532001fd82
22 changed files with 1076 additions and 245 deletions

View File

@ -52,7 +52,7 @@ export class AttachmentService {
// passing attachmentId to allow for updating diagrams
// instead of creating new files for each save
if (opts?.attachmentId) {
let existingAttachment = await this.attachmentRepo.findById(
const existingAttachment = await this.attachmentRepo.findById(
opts.attachmentId,
);
if (!existingAttachment) {

View File

@ -24,7 +24,9 @@ export class JwtStrategy extends PassportStrategy(Strategy, 'jwt') {
try {
accessToken = JSON.parse(req.cookies?.authTokens)?.accessToken;
} catch {}
} catch {
throw new BadRequestException('Failed to parse access token');
}
return accessToken || this.extractTokenFromHeader(req);
},

View File

@ -5,7 +5,8 @@ import { InjectKysely } from 'nestjs-kysely';
import { KyselyDB } from '@docmost/db/types/kysely.types';
import { sql } from 'kysely';
import { PageRepo } from '@docmost/db/repos/page/page.repo';
// eslint-disable-next-line @typescript-eslint/no-var-requires
// eslint-disable-next-line @typescript-eslint/no-require-imports
const tsquery = require('pg-tsquery')();
@Injectable()