refactor(core): Refactor nodes loading (no-changelog) (#7283)
fixes PAY-605
This commit is contained in:
committed by
GitHub
parent
789e1e7ed4
commit
c5ee06cc61
@@ -5,7 +5,7 @@ import { get, post, makeRestApiRequest } from '@/utils';
|
||||
export async function getInstalledCommunityNodes(
|
||||
context: IRestApiContext,
|
||||
): Promise<PublicInstalledPackage[]> {
|
||||
const response = await get(context.baseUrl, '/nodes');
|
||||
const response = await get(context.baseUrl, '/community-packages');
|
||||
return response.data || [];
|
||||
}
|
||||
|
||||
@@ -13,16 +13,16 @@ export async function installNewPackage(
|
||||
context: IRestApiContext,
|
||||
name: string,
|
||||
): Promise<PublicInstalledPackage> {
|
||||
return post(context.baseUrl, '/nodes', { name });
|
||||
return post(context.baseUrl, '/community-packages', { name });
|
||||
}
|
||||
|
||||
export async function uninstallPackage(context: IRestApiContext, name: string): Promise<void> {
|
||||
return makeRestApiRequest(context, 'DELETE', '/nodes', { name });
|
||||
return makeRestApiRequest(context, 'DELETE', '/community-packages', { name });
|
||||
}
|
||||
|
||||
export async function updatePackage(
|
||||
context: IRestApiContext,
|
||||
name: string,
|
||||
): Promise<PublicInstalledPackage> {
|
||||
return makeRestApiRequest(context, 'PATCH', '/nodes', { name });
|
||||
return makeRestApiRequest(context, 'PATCH', '/community-packages', { name });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user