Hi community, I have been trying to implement multi-tenancy in my project. I have a collection, with slug work defined here:
import { CollectionConfig } from "payload/types";
import { tenants } from "../../access/tenants";
import { tenant } from "../../fields/tenant";
import { isTenantAdmins } from "../../access/isTenantAdmins";
const Work: CollectionConfig = {
slug: "work",
access: {
create: tenants,
read: tenants,
update: tenants,
delete: isTenantAdmins,
},
fields: [
{
name: "id",
label: "Key",
type: "text",
required: true,
},
{
name: "value",
type: "textarea",
required: true,
},
tenant,
],
};
export default Work;
When-ever I am trying to create a data in work collection via postman. I am getting response message as tenant created successfully instead of work created successfully. Why is this happening and how to resolve this issue.