b9cb6d1c10
将来ESMに移行しやすいように Related: #7658 なんかmochaが起動しなくなってるけど理由不明 すぐ直したい
12 lines
283 B
TypeScript
12 lines
283 B
TypeScript
import config from '@/config/index.js';
|
|
import { ILocalUser, User } from '@/models/entities/user.js';
|
|
|
|
export default (object: any, user: { id: User['id'] }) => {
|
|
if (object == null) return null;
|
|
|
|
return {
|
|
type: 'Undo',
|
|
actor: `${config.url}/users/${user.id}`,
|
|
object
|
|
};
|
|
};
|