All files / src/models namespaces.js

50% Statements 7/14
100% Branches 1/1
0% Functions 0/2
50% Lines 7/14

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 15193x 193x 193x 193x 193x     193x 193x            
import { getNamespaces as getTcpRedirNamespaces } from '@clevercloud/client/esm/api/v2/organisation.js';
import * as Application from './application.js';
import { sendToApi } from './send-to-api.js';
 
export async function getNamespaces(ownerId) {
  return getTcpRedirNamespaces({ id: ownerId }).then(sendToApi);
}
 
export async function completeNamespaces() {
  // Sadly we do not have access to current params in complete as of now
  const { ownerId } = await Application.resolveId(null, null);

  return getNamespaces(ownerId);
}