mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-24 08:33:08 +02:00
d071d18dd7
* wip * wip * fix * clean up * Update tsconfig.json * Update activitypub.ts * wip
13 lines
398 B
TypeScript
13 lines
398 B
TypeScript
import { ModerationLogs } from '@/models/index.js';
|
|
import { genId } from '@/misc/gen-id.js';
|
|
import { User } from '@/models/entities/user.js';
|
|
|
|
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 || {},
|
|
});
|
|
}
|