#Resolving "storeModuleService" returns undefined

3 messages · Page 1 of 1 (latest)

vale lance
#

How can I access the StoreModuleService to create new stores (for marketplace)? I am able to access StoreService, but is only for a single store.

Note: I want the user to be able to create multiple stores.

export async function GET(
  req: MedusaRequest,
  res: MedusaResponse
): Promise<void> {
  const logger = req.scope.resolve("logger");
  const store = req.scope.resolve("storeModuleService");

  logger.info(store
);

  res.sendStatus(200);
}
quaint bone
#

have you tried storeService ?

vale lance