Browse Source

qrcode: cleanup

pull/4142/head
Daniel Spaude 2 years ago
parent
commit
dacaf9f66a
No known key found for this signature in database
GPG Key ID: 654A3D1FA4F35FFE
  1. 2
      packages/nocodb/src/lib/meta/api/dataApis/dataAliasApis.ts
  2. 1
      packages/nocodb/src/lib/meta/api/dataApis/dataApis.ts
  3. 1
      packages/nocodb/src/lib/meta/api/publicApis/publicDataApis.ts
  4. 2
      packages/nocodb/src/lib/models/Column.ts
  5. 1
      packages/nocodb/src/lib/models/QrCodeColumn.ts

2
packages/nocodb/src/lib/meta/api/dataApis/dataAliasApis.ts

@ -13,7 +13,6 @@ import getAst from '../../../db/sql-data-mapper/lib/sql/helpers/getAst';
// todo: Handle the error case where view doesnt belong to model // todo: Handle the error case where view doesnt belong to model
async function dataList(req: Request, res: Response) { async function dataList(req: Request, res: Response) {
// BOOKMARK
const { model, view } = await getViewAndModelFromRequestByAliasOrId(req); const { model, view } = await getViewAndModelFromRequestByAliasOrId(req);
res.json(await getDataList(model, view, req)); res.json(await getDataList(model, view, req));
} }
@ -129,7 +128,6 @@ async function getDataList(model, view: View, req) {
// e.g. search some text in a numeric field // e.g. search some text in a numeric field
} }
// BOOKMARK
return new PagedResponseImpl(data, { return new PagedResponseImpl(data, {
...req.query, ...req.query,
count, count,

1
packages/nocodb/src/lib/meta/api/dataApis/dataApis.ts

@ -11,7 +11,6 @@ import apiMetrics from '../../helpers/apiMetrics';
import getAst from '../../../db/sql-data-mapper/lib/sql/helpers/getAst'; import getAst from '../../../db/sql-data-mapper/lib/sql/helpers/getAst';
export async function dataList(req: Request, res: Response, next) { export async function dataList(req: Request, res: Response, next) {
// BOOKMARK
const view = await View.get(req.params.viewId); const view = await View.get(req.params.viewId);
const model = await Model.getByIdOrName({ const model = await Model.getByIdOrName({

1
packages/nocodb/src/lib/meta/api/publicApis/publicDataApis.ts

@ -70,7 +70,6 @@ export async function dataList(req: Request, res: Response) {
{}, {},
listArgs listArgs
); );
// BOOKMARK
count = await baseModel.count(listArgs); count = await baseModel.count(listArgs);
} catch (e) { } catch (e) {
// show empty result instead of throwing error here // show empty result instead of throwing error here

2
packages/nocodb/src/lib/models/Column.ts

@ -221,7 +221,6 @@ export default class Column<T = any> implements ColumnType {
break; break;
} }
case UITypes.QrCode: { case UITypes.QrCode: {
// BOOKMARK
await QrCodeColumn.insert( await QrCodeColumn.insert(
{ {
fk_column_id: colId, fk_column_id: colId,
@ -523,7 +522,6 @@ export default class Column<T = any> implements ColumnType {
return columns.map(c => new Column(c));*/ return columns.map(c => new Column(c));*/
} }
// BOOKMARK
public static async get( public static async get(
{ {
base_id, base_id,

1
packages/nocodb/src/lib/models/QrCodeColumn.ts

@ -15,7 +15,6 @@ export default class QrCodeColumn {
data: Partial<QrCodeColumn>, data: Partial<QrCodeColumn>,
ncMeta = Noco.ncMeta ncMeta = Noco.ncMeta
) { ) {
// BOOKMARK
await ncMeta.metaInsert2(null, null, MetaTable.COL_QRCODE, { await ncMeta.metaInsert2(null, null, MetaTable.COL_QRCODE, {
fk_column_id: data.fk_column_id, fk_column_id: data.fk_column_id,
fk_qr_value_column_id: data.fk_qr_value_column_id, fk_qr_value_column_id: data.fk_qr_value_column_id,

Loading…
Cancel
Save