|
|
@@ -595,7 +595,8 @@ export class QdrantEndpoint extends BaseEndpointComponent {
|
|
|
try {
|
|
|
const { shopId } = req.params;
|
|
|
|
|
|
- const shop = this.db.getShopById(shopId);
|
|
|
+ // Get shop by any ID (try custom_id first, then internal ID)
|
|
|
+ const shop = this.db.getShopByAnyId(shopId);
|
|
|
if (!shop) {
|
|
|
res.status(404).json({ error: 'Shop not found' });
|
|
|
return;
|
|
|
@@ -636,7 +637,8 @@ export class QdrantEndpoint extends BaseEndpointComponent {
|
|
|
const { shopId } = req.params;
|
|
|
const { enabled } = req.body;
|
|
|
|
|
|
- const shop = this.db.getShopById(shopId);
|
|
|
+ // Get shop by any ID (try custom_id first, then internal ID)
|
|
|
+ const shop = this.db.getShopByAnyId(shopId);
|
|
|
if (!shop) {
|
|
|
res.status(404).json({ error: 'Shop not found' });
|
|
|
return;
|
|
|
@@ -766,7 +768,8 @@ export class QdrantEndpoint extends BaseEndpointComponent {
|
|
|
const { shopId } = req.params;
|
|
|
const { content_type } = req.body || {};
|
|
|
|
|
|
- const shop = this.db.getShopById(shopId);
|
|
|
+ // Get shop by any ID (try custom_id first, then internal ID)
|
|
|
+ const shop = this.db.getShopByAnyId(shopId);
|
|
|
if (!shop) {
|
|
|
res.status(404).json({ error: 'Shop not found' });
|
|
|
return;
|
|
|
@@ -885,7 +888,8 @@ export class QdrantEndpoint extends BaseEndpointComponent {
|
|
|
const { shopId } = req.params;
|
|
|
|
|
|
// Get shop from database - try both internal ID and custom ID
|
|
|
- let shop = this.db.getShopById(shopId);
|
|
|
+ // Get shop by any ID (try custom_id first, then internal ID)
|
|
|
+ let shop = this.db.getShopByAnyId(shopId);
|
|
|
if (!shop) {
|
|
|
shop = this.db.getShopByCustomId(shopId);
|
|
|
}
|
|
|
@@ -917,7 +921,8 @@ export class QdrantEndpoint extends BaseEndpointComponent {
|
|
|
const { shopId } = req.params;
|
|
|
|
|
|
// Get shop from database - try both internal ID and custom ID
|
|
|
- let shop = this.db.getShopById(shopId);
|
|
|
+ // Get shop by any ID (try custom_id first, then internal ID)
|
|
|
+ let shop = this.db.getShopByAnyId(shopId);
|
|
|
if (!shop) {
|
|
|
shop = this.db.getShopByCustomId(shopId);
|
|
|
}
|
|
|
@@ -954,7 +959,8 @@ export class QdrantEndpoint extends BaseEndpointComponent {
|
|
|
const { shopId } = req.params;
|
|
|
|
|
|
// Get shop from database - try both internal ID and custom ID
|
|
|
- let shop = this.db.getShopById(shopId);
|
|
|
+ // Get shop by any ID (try custom_id first, then internal ID)
|
|
|
+ let shop = this.db.getShopByAnyId(shopId);
|
|
|
if (!shop) {
|
|
|
shop = this.db.getShopByCustomId(shopId);
|
|
|
}
|
|
|
@@ -989,7 +995,8 @@ export class QdrantEndpoint extends BaseEndpointComponent {
|
|
|
const { shopId } = req.params;
|
|
|
|
|
|
// Get shop from database - try both internal ID and custom ID
|
|
|
- let shop = this.db.getShopById(shopId);
|
|
|
+ // Get shop by any ID (try custom_id first, then internal ID)
|
|
|
+ let shop = this.db.getShopByAnyId(shopId);
|
|
|
if (!shop) {
|
|
|
shop = this.db.getShopByCustomId(shopId);
|
|
|
}
|
|
|
@@ -1015,7 +1022,8 @@ export class QdrantEndpoint extends BaseEndpointComponent {
|
|
|
const { shopId } = req.params;
|
|
|
|
|
|
// Get shop from database - try both internal ID and custom ID
|
|
|
- let shop = this.db.getShopById(shopId);
|
|
|
+ // Get shop by any ID (try custom_id first, then internal ID)
|
|
|
+ let shop = this.db.getShopByAnyId(shopId);
|
|
|
if (!shop) {
|
|
|
shop = this.db.getShopByCustomId(shopId);
|
|
|
}
|
|
|
@@ -1060,7 +1068,8 @@ export class QdrantEndpoint extends BaseEndpointComponent {
|
|
|
const { shopId } = req.params;
|
|
|
|
|
|
// Get shop from database - try both internal ID and custom ID
|
|
|
- let shop = this.db.getShopById(shopId);
|
|
|
+ // Get shop by any ID (try custom_id first, then internal ID)
|
|
|
+ let shop = this.db.getShopByAnyId(shopId);
|
|
|
if (!shop) {
|
|
|
shop = this.db.getShopByCustomId(shopId);
|
|
|
}
|