n8n-nodes-userapi 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -6,6 +6,7 @@ const webhookTypeOptions = [
|
|
|
6
6
|
{ name: 'Progress', value: 'progress' },
|
|
7
7
|
{ name: 'Result', value: 'result' },
|
|
8
8
|
];
|
|
9
|
+
const API_BASE_URL = 'https://api.userapi.ai';
|
|
9
10
|
const operationOptions = [
|
|
10
11
|
{ name: 'Imagine', value: 'imagine', description: 'POST /midjourney/v2/imagine' },
|
|
11
12
|
{ name: 'Imagine Instant', value: 'imagineInstant', description: 'POST /midjourney/v2/imagine-instant' },
|
|
@@ -455,6 +456,9 @@ class UserApi {
|
|
|
455
456
|
if (requestOptions.json !== false) {
|
|
456
457
|
requestOptions.headers = { ...((_a = requestOptions.headers) !== null && _a !== void 0 ? _a : {}), 'Content-Type': 'application/json' };
|
|
457
458
|
}
|
|
459
|
+
if (typeof requestOptions.url === 'string' && requestOptions.url.startsWith('/')) {
|
|
460
|
+
requestOptions.url = `${API_BASE_URL}${requestOptions.url}`;
|
|
461
|
+
}
|
|
458
462
|
if (Object.keys(body).length > 0)
|
|
459
463
|
requestOptions.body = body;
|
|
460
464
|
if (Object.keys(query).length > 0)
|