generated from autonomic-cooperative/astro-payload-template
15 lines
417 B
TypeScript
15 lines
417 B
TypeScript
import { Payload } from "payload";
|
|
import { User } from "./payload-types";
|
|
|
|
export const seed = async (payload: Payload): Promise<void> => {
|
|
// Local API methods skip all access control by default
|
|
// so we can easily create an admin user directly in init
|
|
await payload.create<User>({
|
|
collection: 'users',
|
|
data: {
|
|
email: 'astro@ssg.js',
|
|
password: 'password',
|
|
roles: ['ssg']
|
|
}
|
|
})
|
|
} |