mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-25 05:33:08 +02:00
10 lines
345 B
TypeScript
10 lines
345 B
TypeScript
import config from '../../../config';
|
|
import { extractPublic } from '../../../crypto_key';
|
|
import { ILocalUser } from '../../../models/user';
|
|
|
|
export default (user: ILocalUser) => ({
|
|
id: `${config.url}/@${user.username}/publickey`,
|
|
type: 'Key',
|
|
owner: `${config.url}/@${user.username}`,
|
|
publicKeyPem: extractPublic(user.account.keypair)
|
|
});
|