File size: 404 Bytes
1e92f2d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
import wpcom from 'calypso/lib/wp';
export interface UserSshKey {
name: string;
key: string;
type:
| 'ssh-rsa'
| 'ssh-ed25519'
| 'ecdsa-sha2-nistp256'
| 'ecdsa-sha2-nistp384'
| 'ecdsa-sha2-nistp521';
sha256: string;
created_at: string;
}
export async function fetchSshKeys(): Promise< UserSshKey[] > {
return wpcom.req.get( {
path: '/me/ssh-keys',
apiNamespace: 'wpcom/v2',
} );
}
|