All files / src/models ssh-keys.js

70% Statements 7/10
100% Branches 1/1
0% Functions 0/1
70% Lines 7/10

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 11193x 193x 193x 193x 193x 193x 193x        
import { todo_getSshKeys as getSshKeys } from '@clevercloud/client/esm/api/v2/user.js';
import { sendToApi } from './send-to-api.js';
 
/**
 * @return {Promise<Array<{ name: string, key: string, fingerprint: string }>>}
 */
export async function getUserSshKeys() {
  const rawKeys = await getSshKeys().then(sendToApi);
  return rawKeys.sort((a, b) => a.name.localeCompare(b.name));
}