1
0
mirror of https://github.com/hotomoe/hotomoe synced 2025-01-13 05:12:52 +09:00
hotomoe/src/services/insert-moderation-log.ts
syuilo b9cb6d1c10 refactor: refactoring imports
将来ESMに移行しやすいように
Related: #7658

なんかmochaが起動しなくなってるけど理由不明
すぐ直したい
2021-08-19 18:33:41 +09:00

14 lines
397 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 || {}
});
}