mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-27 12:27:29 -07:00
17 lines
409 B
TypeScript
17 lines
409 B
TypeScript
import { ModerationLogs } from "@/models/index.js";
|
|
import { genId } from "@/misc/gen-id.js";
|
|
import type { 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 || {},
|
|
});
|
|
}
|