2021-08-19 12:55:45 +00:00
|
|
|
import config from '@/config/index';
|
|
|
|
import { ILocalUser, User } from '@/models/entities/user';
|
2018-08-25 05:46:47 +00:00
|
|
|
|
2021-05-19 07:15:01 +00:00
|
|
|
export default (object: any, user: { id: User['id'] }) => {
|
|
|
|
if (object == null) return null;
|
|
|
|
|
|
|
|
return {
|
|
|
|
type: 'Undo',
|
|
|
|
actor: `${config.url}/users/${user.id}`,
|
2021-10-31 06:18:46 +00:00
|
|
|
object,
|
|
|
|
published: new Date().toISOString(),
|
2021-05-19 07:15:01 +00:00
|
|
|
};
|
|
|
|
};
|