chore: adds users collection

This commit is contained in:
Jarrod Flesch
2024-10-16 10:58:29 -04:00
parent a9c6a91c1c
commit 7426e73f81
2 changed files with 11 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
import type { CollectionConfig } from 'payload'
export const UsersCollection: CollectionConfig = {
slug: 'users',
auth: true,
fields: [],
}

View File

@@ -6,13 +6,16 @@ import { buildConfigWithDefaults } from '../buildConfigWithDefaults.js'
import { devUser } from '../credentials.js'
import { MediaCollection } from './collections/Media/index.js'
import { PostsCollection, postsSlug } from './collections/Posts/index.js'
import { UsersCollection } from './collections/Users/index.js'
import { MenuGlobal } from './globals/Menu/index.js'
const filename = fileURLToPath(import.meta.url)
const dirname = path.dirname(filename)
export default buildConfigWithDefaults({
// ...extend config here
collections: [
UsersCollection,
PostsCollection,
{
slug: 'simple',
@@ -26,6 +29,7 @@ export default buildConfigWithDefaults({
MediaCollection,
],
admin: {
user: 'users',
importMap: {
baseDir: path.resolve(dirname),
},