* feat: validate relationship and upload ids * chore: update fields-relationship test data * fix: skip FE relationship and upload id validation
9 lines
238 B
TypeScript
9 lines
238 B
TypeScript
import { Field } from '../fields/config/types';
|
|
|
|
export const getIDType = (idField: Field | null): 'number' | 'text' | 'ObjectID' => {
|
|
if (idField) {
|
|
return idField.type === 'number' ? 'number' : 'text';
|
|
}
|
|
return 'ObjectID';
|
|
};
|