huridocs/uwazi

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

Summary

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

interface GetRelationshipData {
  sharedId: string;
}

const schema: ValidatorSchema<GetRelationshipData> = {
  properties: {
    sharedId: {
      type: 'string',
    },
  },
};

export const validateGetRelationships = createValidator(schema);