Initial commit: core-prestashop module v1.1.1

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
fatequod
2026-07-07 14:30:30 +02:00
co-authored by Cursor
commit f163100ad4
33 changed files with 2605 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
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 } });
const form = toFormResponse(config);
Log.debug(companyId, 'config.get', {
found: Boolean(config),
storeUrl: form.storeUrl,
shopPrefix: form.shopPrefix,
hasApiKey: form.hasApiKey,
psStatesCount: form.psStates?.length ?? 0
});
return { data: form };
};