MCPcopy Index your code
hub / github.com/xerrors/Yuxi / buildQuery

Function buildQuery

web/src/apis/workspace_api.js:3–11  ·  view source on GitHub ↗
(params)

Source from the content-addressed store, hash-verified

1import { apiDelete, apiGet, apiPost, apiPut } from './base'
2
3const buildQuery = (params) => {
4 const query = new URLSearchParams()
5 Object.entries(params).forEach(([key, value]) => {
6 if (value !== undefined && value !== null && value !== '') {
7 query.set(key, String(value))
8 }
9 })
10 return query.toString()
11}
12
13export const getWorkspaceTree = (path = '/', recursive = false, filesOnly = false) => {
14 const query = buildQuery({ path, recursive, files_only: filesOnly })

Callers 7

getWorkspaceTreeFunction · 0.70
getWorkspaceFileContentFunction · 0.70
deleteWorkspacePathFunction · 0.70
downloadWorkspaceFileFunction · 0.70

Calls 1

setMethod · 0.80

Tested by

no test coverage detected