mirror of
https://github.com/misskey-dev/misskey.git
synced 2024-12-21 08:55:08 +01:00
0e4a111f81
Resolve #7779
13 lines
388 B
TypeScript
13 lines
388 B
TypeScript
import { ModerationLogs } from '@/models/index';
|
|
import { genId } from '@/misc/gen-id';
|
|
import { User } from '@/models/entities/user';
|
|
|
|
export async function insertModerationLog(moderator: { id: User['id'] }, type: string, info?: Record<string, any>) {
|
|
await ModerationLogs.insert({
|
|
id: genId(),
|
|
createdAt: new Date(),
|
|
userId: moderator.id,
|
|
type: type,
|
|
info: info || {}
|
|
});
|
|
}
|