Heya, making my first steps into payload and unfortunately I am blocked by a weird not yet understandable issue.
I have added a new collection next to the user collection that should be accessible by the rest api using the auth tokens generated on user collection objects. Using that generated token I can create one new entry for the second collection (configurator) via api and when proceeding by creating another one, I receive an validation error "email must be unique". Seems like somehow the collection I want to create is linked to the accounts email address.. Is there a way to debug / get around such things?
My collection
const Users: CollectionConfig = {
slug: 'users',
auth: {
useAPIKey: true,
},
admin: {
useAsTitle: 'email',
},
fields: [
// Email added by default
// Add more fields as needed
],
};
const Configurators: CollectionConfig = {
slug: 'configurators',
admin: {
useAsTitle: 'title',
defaultColumns: [],
},
access: {
create: () => true,
read: () => true,
update: () => true,
delete: () => true,
},
fields: [
{
name: 'title', // required
type: 'text', // required
required: true,
localized: true,
},
],
};