Hello Devs,
I'm fairly new to medusa and have been facing a problem for a few days.
I've done a lot of research and couldn't help myself.
I have extended the collection so that you can assign a image.
This works fine for the admin api.
But in the Store API I can't get the new field.
What am I doing wrong?
const adminCollectionImports = (await import(
"@medusajs/medusa/dist/api/routes/admin/collections/index"
)) as any;
const storeCollectionImports = (await import(
"@medusajs/medusa/dist/api/routes/store/collections/index"
)) as any;
adminCollectionImports.defaultAdminCollectionsRelations = [
...adminCollectionImports.defaultAdminCollectionsRelations,
"images",
];
storeCollectionImports.defaultStoreCollectionRelations = [
...storeCollectionImports.defaultStoreCollectionRelations,
"images",
];
storeCollectionImports.allowedFields = [
...storeCollectionImports.allowedFields,
"images",
];
}```