pl-api: fix regression

Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
This commit is contained in:
nicole mikołajczyk
2026-03-25 22:10:38 +01:00
parent 0504f671e1
commit 52fcb72c1d
2 changed files with 4 additions and 10 deletions

View File

@@ -99,7 +99,7 @@ function request<T = any>(
params,
onUploadProgress,
signal,
contentType = 'application/json',
contentType,
formData,
idempotencyKey,
}: RequestBody = {},
@@ -113,7 +113,8 @@ function request<T = any>(
else if (this.accessToken) headers.set('Authorization', `Bearer ${this.accessToken}`);
else if (this.customAuthorizationToken)
headers.set('Authorization', this.customAuthorizationToken);
if (!formData) headers.set('Content-Type', contentType);
if ((!formData && body) || contentType)
headers.set('Content-Type', contentType || 'application/json');
if (idempotencyKey) headers.set('Idempotency-Key', idempotencyKey);
body = body && formData ? serialize(body, { indices: true }) : JSON.stringify(body);

View File

@@ -9,14 +9,7 @@ const config = {
},
categorizeByGroup: true,
sort: ['kind', 'alphabetical'],
kindSortOrder: [
'Function',
'Class',
'Interface',
'TypeAlias',
'Variable',
'Enum',
],
kindSortOrder: ['Function', 'Class', 'Interface', 'TypeAlias', 'Variable', 'Enum'],
intentionallyNotExported: [
'CreateStatusOptionalParams',
'CreateStatusWithContent',