Browse Source

chore: lint

pull/8592/head
Pranav C 6 months ago
parent
commit
878da92b2c
  1. 1
      packages/nocodb/src/controllers/comments.controller.ts
  2. 1
      packages/nocodb/src/meta/migrations/v2/nc_046_comment_mentions.ts
  3. 6
      packages/nocodb/src/meta/migrations/v2/nc_047_comment_migration.ts
  4. 3
      packages/nocodb/src/utils/richTextHelper.ts

1
packages/nocodb/src/controllers/comments.controller.ts

@ -11,7 +11,6 @@ import {
Req,
UseGuards,
} from '@nestjs/common';
import { Request } from 'express';
import { GlobalGuard } from '~/guards/global/global.guard';
import { PagedResponseImpl } from '~/helpers/PagedResponse';
import { CommentsService } from '~/services/comments.service';

1
packages/nocodb/src/meta/migrations/v2/nc_046_comment_mentions.ts

@ -1,4 +1,3 @@
import { Logger } from '@nestjs/common';
import type { Knex } from 'knex';
import { MetaTable } from '~/utils/globals';

6
packages/nocodb/src/meta/migrations/v2/nc_047_comment_migration.ts

@ -38,7 +38,7 @@ const up = async (knex: Knex) => {
.limit(READ_BATCH_SIZE + 1);
logger.log(
`Data from Audit Table fetched, batch: ${offset} - ${
`Data from Audit Table fetched, batch: ${offset} - ${
offset + READ_BATCH_SIZE
}`,
);
@ -72,9 +72,7 @@ const up = async (knex: Knex) => {
// check if there are more rows to fetch
fetchNextBatch = rows.length > READ_BATCH_SIZE;
}
logger.log(
'Data migrated from Audit Table to Comments Table',
);
logger.log('Data migrated from Audit Table to Comments Table');
};
const down = async (knex: Knex) => {

3
packages/nocodb/src/utils/richTextHelper.ts

@ -6,8 +6,7 @@ export const extractMentions = (richText: string) => {
const regex = /@\(([^)]+)\)/g;
let match: RegExpExecArray | null;
match = regex.exec(richText);
const match: RegExpExecArray | null = regex.exec(richText);
while (match !== null) {
const userId = match[1].split('|')[0]; // Extracts the userId part from the matched string
mentions.push(userId);

Loading…
Cancel
Save