Files
server/src/util/Event.ts
T
2021-04-07 20:25:37 +02:00

14 lines
331 B
TypeScript

import { Event, EventModel } from "fosscord-server-util";
export async function emitEvent(payload: Omit<Event, "created_at">) {
const obj = {
created_at: new Date(), // in seconds
...payload,
};
// TODO: bigint isn't working
return await new EventModel(obj).save();
}
export async function emitAuditLog(payload: any) {}