-
-
Save kobeaerts/cd40e51224f9821b3ea06c3858f39a65 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { | |
buildConfig, | |
} from 'payload/config'; | |
import path from 'path'; | |
import { | |
// Components, | |
// Manufacturers, | |
// Projects, | |
Users, | |
} from './collections'; | |
export default buildConfig({ | |
serverURL: 'http://localhost:3000', | |
admin: { | |
user: Users.slug, | |
}, | |
collections: [ | |
// Components, | |
// Manufacturers, | |
// Projects, | |
Users, | |
], | |
typescript: { | |
outputFile: path.resolve(__dirname, 'payload-types.ts'), | |
}, | |
graphQL: { | |
schemaOutputFile: path.resolve(__dirname, 'generated-schema.graphql'), | |
}, | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { CollectionConfig } from 'payload/types'; | |
const Users: CollectionConfig = { | |
slug: 'users', | |
auth: true, | |
admin: { | |
useAsTitle: 'email', | |
}, | |
access: { | |
read: () => true, | |
}, | |
fields: [ | |
// Email added by default | |
// Add more fields as needed | |
{ | |
name: 'firstName', | |
type: 'text', | |
}, | |
{ | |
name: 'lastName', | |
type: 'text', | |
}, | |
], | |
}; | |
export default Users; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment