mirror of
https://github.com/MisskeyIO/misskey
synced 2024-12-25 20:18:18 +09:00
0e4a111f81
Resolve #7779
23 lines
485 B
TypeScript
23 lines
485 B
TypeScript
import $ from 'cafy';
|
|
import { ID } from '@/misc/cafy-id';
|
|
import define from '../../define';
|
|
import { getRemoteUser } from '../../common/getters';
|
|
import { updatePerson } from '@/remote/activitypub/models/person';
|
|
|
|
export const meta = {
|
|
tags: ['federation'],
|
|
|
|
requireCredential: true as const,
|
|
|
|
params: {
|
|
userId: {
|
|
validator: $.type(ID),
|
|
},
|
|
}
|
|
};
|
|
|
|
export default define(meta, async (ps) => {
|
|
const user = await getRemoteUser(ps.userId);
|
|
await updatePerson(user.uri!);
|
|
});
|