Browse Source

chore: remove commented code

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/6718/head
Pranav C 1 year ago
parent
commit
f8ebf5dd01
  1. 19
      packages/nocodb/src/Noco.ts
  2. 4
      packages/nocodb/src/db/conditionV2.ts

19
packages/nocodb/src/Noco.ts

@ -13,8 +13,6 @@ import { Logger } from '@nestjs/common';
import type { MetaService } from '~/meta/meta.service';
import type { IEventEmitter } from '~/modules/event-emitter/event-emitter.interface';
import type { Express } from 'express';
// import type * as http from 'http';
import type http from 'http';
import { MetaTable } from '~/utils/globals';
import { AppModule } from '~/app.module';
@ -138,8 +136,6 @@ export default class Noco {
server.get('/', (_req, res) => res.redirect(dashboardPath));
}
// this.initSentryErrorHandler(server);
return nestApp.getHttpAdapter().getInstance();
}
}
@ -188,19 +184,4 @@ export default class Noco {
}
process.env.NC_SERVER_UUID = serverId;
}
//
// private static initSentryErrorHandler(router) {
// if (process.env.NC_SENTRY_DSN) {
// router.use(Sentry.Handlers.errorHandler());
// }
// }
//
// private static initSentry(router) {
// if (process.env.NC_SENTRY_DSN) {
// Sentry.init({ dsn: process.env.NC_SENTRY_DSN });
//
// // The request handler must be the first middleware on the app
// router.use(Sentry.Handlers.requestHandler());
// }
// }
}

4
packages/nocodb/src/db/conditionV2.ts

@ -553,7 +553,9 @@ const parseConditionV2 = async (
val = `%${val}%`.replace(/^%'([\s\S]*)'%$/, '%$1%');
} else {
val =
(val + '').startsWith('%') || (val + '').endsWith('%') ? val : `%${val}%`;
(val + '').startsWith('%') || (val + '').endsWith('%')
? val
: `%${val}%`;
}
if (qb?.client?.config?.client === 'pg') {
qb = qb.where(knex.raw('??::text ilike ?', [field, val]));

Loading…
Cancel
Save