|
|
@@ -24,7 +24,7 @@ export class CustomUrlsEndpoint extends BaseEndpointComponent {
|
|
|
in: 'path',
|
|
|
type: 'string',
|
|
|
required: true,
|
|
|
- description: 'Shop ID'
|
|
|
+ description: 'Shop ID (internal UUID or custom UUID)'
|
|
|
}
|
|
|
],
|
|
|
requestBody: {
|
|
|
@@ -141,7 +141,7 @@ export class CustomUrlsEndpoint extends BaseEndpointComponent {
|
|
|
in: 'path',
|
|
|
type: 'string',
|
|
|
required: true,
|
|
|
- description: 'Shop ID'
|
|
|
+ description: 'Shop ID (internal UUID or custom UUID)'
|
|
|
},
|
|
|
{
|
|
|
name: 'customUrlId',
|
|
|
@@ -200,7 +200,7 @@ export class CustomUrlsEndpoint extends BaseEndpointComponent {
|
|
|
in: 'path',
|
|
|
type: 'string',
|
|
|
required: true,
|
|
|
- description: 'Shop ID'
|
|
|
+ description: 'Shop ID (internal UUID or custom UUID)'
|
|
|
},
|
|
|
{
|
|
|
name: 'customUrlId',
|
|
|
@@ -268,8 +268,8 @@ export class CustomUrlsEndpoint extends BaseEndpointComponent {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- // Check if shop exists
|
|
|
- const shop = this.db.getShopById(id);
|
|
|
+ // Check if shop exists (try custom_id first, then internal ID)
|
|
|
+ const shop = this.db.getShopByAnyId(id);
|
|
|
if (!shop) {
|
|
|
res.status(404).json({ error: 'Shop not found' });
|
|
|
return;
|
|
|
@@ -370,7 +370,8 @@ export class CustomUrlsEndpoint extends BaseEndpointComponent {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- const shop = this.db.getShopById(id);
|
|
|
+ // Get shop by any ID (try custom_id first, then internal ID)
|
|
|
+ const shop = this.db.getShopByAnyId(id);
|
|
|
if (!shop) {
|
|
|
res.status(404).json({ error: 'Shop not found' });
|
|
|
return;
|
|
|
@@ -409,7 +410,8 @@ export class CustomUrlsEndpoint extends BaseEndpointComponent {
|
|
|
|
|
|
const { id, customUrlId } = req.params;
|
|
|
|
|
|
- const shop = this.db.getShopById(id);
|
|
|
+ // Get shop by any ID (try custom_id first, then internal ID)
|
|
|
+ const shop = this.db.getShopByAnyId(id);
|
|
|
if (!shop) {
|
|
|
res.status(404).json({ error: 'Shop not found' });
|
|
|
return;
|