MCPcopy Index your code
hub / github.com/TaskingAI/TaskingAI / getPluginList

Function getPluginList

frontend/src/axios/plugin.ts:18–35  ·  view source on GitHub ↗
(params)

Source from the content-addressed store, hash-verified

16 return await request.post(`api/v1/bundle_instances`, params);
17};
18const getPluginList = async (params) => {
19 const data = params;
20 let str = "";
21 if (data.hasOwnProperty("name_search")) {
22 str += `prefix_filter={"name":"${data.name_search}"}&`;
23 delete data.name_search;
24 } else if (data.hasOwnProperty("id_search")) {
25 str += `prefix_filter={"bundle_instance_id":"${data.id_search}"}&`;
26 delete data.id_search;
27 }
28 if (data) {
29 Object.keys(data).forEach((key) => {
30 str += `${key}=${data[key]}&`;
31 });
32 str = str.substring(0, str.length - 1);
33 }
34 return await request.get(`api/v1/bundle_instances?${str}`);
35};
36const editPlugin = async (id: string, params) => {
37 return await request.post(`api/v1/bundle_instances/${id}`, params);
38};

Callers 2

fetchDataFunction · 0.90
getBundleListFunction · 0.90

Calls 1

getMethod · 0.45

Tested by

no test coverage detected