mirror of
https://activitypub.software/TransFem-org/Sharkey.git
synced 2024-11-17 05:26:39 +01:00
10 lines
337 B
TypeScript
10 lines
337 B
TypeScript
import config from '../../../config';
|
|
import { extractPublic } from '../../../crypto_key';
|
|
import { ILocalUser } from '../../../models/user';
|
|
|
|
export default (user: ILocalUser) => ({
|
|
id: `${config.url}/users/${user._id}/publickey`,
|
|
type: 'Key',
|
|
owner: `${config.url}/users/${user._id}`,
|
|
publicKeyPem: extractPublic(user.keypair)
|
|
});
|