#in multi-tenancy, getting wrong response message...

5 messages · Page 1 of 1 (latest)

red valve
#

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.

shrewd foxBOT
marble basalt
jolly patrol
#

Hey @marble basalt

Is there an issue created for this ?
where can I look up?

Just wanted to look into it

marble basalt