Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/views/marketplace/api/pluginRegistry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export class PluginRegistry {
headers: {
Accept: 'application/json',
Authorization: `Bearer ${accessToken}`,
...(recloudIdToken && { recloud_id_token: recloudIdToken }), // Include if available
...(recloudIdToken ? { 'recloud-id-token': recloudIdToken } : {}),
},
signal: controller.signal,
});
Expand Down Expand Up @@ -120,7 +120,7 @@ export class PluginRegistry {
headers: {
Accept: 'application/json',
Authorization: `Bearer ${accessToken}`,
...(recloudIdToken && { recloud_id_token: recloudIdToken }), // Include if available
...(recloudIdToken ? { 'recloud-id-token': recloudIdToken } : {}),
},
signal: controller.signal,
});
Expand Down
6 changes: 3 additions & 3 deletions src/views/marketplace/api/plugins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export const installPlugin = async (pluginId: string): Promise<PluginInstallResp
'Content-Type': 'application/json',
Accept: 'application/json',
Authorization: `Bearer ${accessToken}`,
'recloud-id-token': recloudIdToken, // Pass token in header as specified
...(recloudIdToken ? { 'recloud-id-token': recloudIdToken } : {}),
},
body: JSON.stringify(payload),
signal: controller.signal,
Expand Down Expand Up @@ -140,7 +140,7 @@ export const fetchInstalledPlugins = async (): Promise<PluginsResponse> => {
headers: {
Accept: 'application/json',
Authorization: `Bearer ${accessToken}`,
...(recloudIdToken && { recloud_id_token: recloudIdToken }), // Include if available
...(recloudIdToken ? { 'recloud-id-token': recloudIdToken } : {}),
},
signal: controller.signal,
});
Expand Down Expand Up @@ -195,7 +195,7 @@ export const deletePlugin = async (pluginId: string): Promise<PluginResponse> =>
headers: {
Accept: 'application/json',
Authorization: `Bearer ${accessToken}`,
...(recloudIdToken && { recloud_id_token: recloudIdToken }), // Include if available
...(recloudIdToken ? { 'recloud-id-token': recloudIdToken } : {}),
},
signal: controller.signal,
});
Expand Down