Browse Source

chore(nocodb): lint

pull/5222/head
Wing-Kam Wong 2 years ago
parent
commit
4fea010ea5
  1. 4
      packages/nocodb/src/lib/meta/api/helpers/apiHelpers.ts
  2. 4
      packages/nocodb/src/lib/meta/api/helpers/columnHelpers.ts

4
packages/nocodb/src/lib/meta/api/helpers/apiHelpers.ts

@ -1,6 +1,6 @@
import { NextFunction, Request, Response } from 'express'; import { NextFunction, Request, Response } from 'express';
import Ajv, { ErrorObject } from 'ajv'; import Ajv, { ErrorObject } from 'ajv';
import addFormats from "ajv-formats"; import addFormats from 'ajv-formats';
// @ts-ignore // @ts-ignore
import swagger from '../../../../schema/swagger.json'; import swagger from '../../../../schema/swagger.json';
@ -12,7 +12,7 @@ export function parseHrtimeToSeconds(hrtime) {
const ajv = new Ajv({ strictSchema: false, strict: false }); // Initialize AJV const ajv = new Ajv({ strictSchema: false, strict: false }); // Initialize AJV
ajv.addSchema(swagger, 'swagger.json'); ajv.addSchema(swagger, 'swagger.json');
addFormats(ajv) addFormats(ajv);
// A middleware generator to validate the request body // A middleware generator to validate the request body
export const getAjvValidatorMw = (schema) => { export const getAjvValidatorMw = (schema) => {

4
packages/nocodb/src/lib/meta/api/helpers/columnHelpers.ts

@ -77,9 +77,7 @@ export async function createHmAndBtColumn(
} }
} }
export async function validateRollupPayload( export async function validateRollupPayload(payload: ColumnReqType) {
payload: ColumnReqType
) {
validateParams( validateParams(
[ [
'title', 'title',

Loading…
Cancel
Save