huridocs/uwazi

View on GitHub
app/api/relationships.v2/routes/validators/getMigrationHubRecords.ts

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
import { createValidator, ValidatorSchema } from 'api/common.v2/validation/routesValidation';
import { GetMigrationHubRecordsRequest } from 'shared/types/api.v2/migrationHubRecords.get';

const schema: ValidatorSchema<GetMigrationHubRecordsRequest> = {
  properties: {
    page: {
      type: 'string',
    },
    pageSize: {
      type: 'string',
    },
  },
};

export const validateGetMigrationHubRecordsRequest = createValidator(schema);