mirror of
https://github.com/lingble/twenty.git
synced 2025-10-29 03:42:30 +00:00
Add "type" to reserved keywords in object metadata validation (#8548)
This PR adds "type" to the reserved keywords list in validate-object-metadata-input.util.ts. This prevents users from creating objects with "type" as a key, which has caused issues in the past . issue solved #8543 1.Updated the RESERVED_KEYWORDS array to include "type" --------- Co-authored-by: Weiko <corentin@twenty.com>
This commit is contained in:
@@ -40,10 +40,15 @@ const reservedKeywords = [
|
||||
'fullNames',
|
||||
'address',
|
||||
'addresses',
|
||||
'type',
|
||||
'types',
|
||||
'object',
|
||||
'objects',
|
||||
'index',
|
||||
'relation',
|
||||
'relations',
|
||||
];
|
||||
|
||||
const METADATA_NAME_VALID_PATTERN = /^[a-zA-Z][a-zA-Z0-9]*$/;
|
||||
|
||||
export const validateObjectMetadataInputOrThrow = <
|
||||
T extends UpdateObjectPayload | CreateObjectInput,
|
||||
>(
|
||||
|
||||
Reference in New Issue
Block a user