Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
29 lines
529 B
TypeScript
29 lines
529 B
TypeScript
import { CollectionConfig } from "payload";
|
|
import { isDeveloper } from "@/utils/access-control/isRole";
|
|
|
|
export const Maps: CollectionConfig = {
|
|
slug: "maps",
|
|
admin: {
|
|
group: "World",
|
|
useAsTitle: "name",
|
|
},
|
|
access: {
|
|
create: isDeveloper,
|
|
update: isDeveloper,
|
|
delete: isDeveloper,
|
|
read: isDeveloper,
|
|
},
|
|
fields: [
|
|
{
|
|
name: "name",
|
|
type: "text",
|
|
required: true,
|
|
unique: true,
|
|
},
|
|
{
|
|
name: "fileName",
|
|
type: "text",
|
|
unique: true,
|
|
},
|
|
],
|
|
};
|