1
0
mirror of https://github.com/MisskeyIO/misskey synced 2024-12-25 03:58:18 +09:00
MisskeyIO/packages/backend/src/server/api/endpoints/federation/update-remote-user.ts
syuilo 0e4a111f81 refactoring
Resolve #7779
2021-11-12 02:02:25 +09:00

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!);
});