huridocs/uwazi

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

Summary

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

interface DeleteRelationshipsData {
  ids: string[];
}

const schema: ValidatorSchema<DeleteRelationshipsData> = {
  properties: {
    ids: {
      elements: {
        type: 'string',
      },
    },
  },
};

export const validateDeleteRelationships = createValidator(schema);