Migrate to @orbito/api-lib 2.0.0 for single-company container model.
Remove companyId from handlers, models, cron jobs, and cross-module calls to match the v2 one-module-one-company architecture. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -2,11 +2,11 @@ const { Log } = require('@orbito/api-lib');
|
||||
const ShopConfig = require('../../src/models/ShopConfig');
|
||||
const { toFormResponse } = require('../../src/config-form');
|
||||
|
||||
module.exports = async function(companyId, instanceId, params, ctx) {
|
||||
const config = await ShopConfig.findOne({ companyId, isRemoved: { $ne: true } });
|
||||
module.exports = async function(params, ctx) {
|
||||
const config = await ShopConfig.findOne({ isRemoved: { $ne: true } });
|
||||
const form = toFormResponse(config);
|
||||
|
||||
Log.debug(companyId, 'config.get', {
|
||||
Log.debug( 'config.get', {
|
||||
found: Boolean(config),
|
||||
storeUrl: form.storeUrl,
|
||||
shopPrefix: form.shopPrefix,
|
||||
|
||||
Reference in New Issue
Block a user