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
+14
View File
@@ -0,0 +1,14 @@
const { DB, Utils, Log } = require('@orbito/api-lib');
const ShopConfigSchema = require('../src/models/ShopConfig');
module.exports = async function(companyId, instanceId, params, ctx) {
const { _id } = params;
if (!_id) throw new Error('Missing _id');
const config = await ShopConfigSchema.findOne({ _id, companyId, isRemoved: { $ne: true } });
if (!config) throw new Error('Config not found');
await ShopConfigSchema.update({ _id }, { isRemoved: true });
return { success: true };
}