All files / src/clever-client ng.js

50% Statements 9/18
100% Branches 1/1
0% Functions 0/1
50% Lines 9/18

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19193x 193x 193x 193x 193x 193x 193x 193x 193x                    
// TODO: Move this to the Clever Cloud JS Client
 
/**
 * GET /networkgroups/organisations/{ownerId}/networkgroups/search?query
 * @param {Object} params
 * @param {String} params.ownerId
 * @param {String} params.query
 */
export function searchNetworkGroupOrResource(params) {
  // no multipath for /self or /organisations/{id}
  return Promise.resolve({
    method: 'get',
    url: `/v4/networkgroups/organisations/${params.ownerId}/networkgroups/search`,
    headers: { Accept: 'application/json' },
    queryParams: { query: params.query },
    // no body
  });
}