huridocs/uwazi

View on GitHub
app/api/entities/validateEntity.ts

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
import { validateEntitySchema } from './validation/validateEntitySchema';
import { validateEntityData } from './validation/validateEntityData';

export const validateEntity = async (entity: any) => {
  await validateEntitySchema(entity);
  await validateEntityData(entity);
};