mirror of
https://iceshrimp.dev/crimekillz/trashposs
synced 2024-11-24 17:59:05 +01:00
11 lines
337 B
TypeScript
11 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)
|
|
});
|