fix audit log in api route
This commit is contained in:
parent
c9837a6bd4
commit
0304ec657a
|
@ -1,5 +1,5 @@
|
|||
import apiAuth from "@/lib/apiAuth";
|
||||
import { auditLog } from "@/lib/audit";
|
||||
import { auditLogRaw } from "@/lib/audit";
|
||||
import { AliasEntry, createAliasEntry } from "@/lib/db";
|
||||
import { generateAliasEmail } from "@/lib/util-server";
|
||||
import { NextResponse } from "next/server";
|
||||
|
@ -72,7 +72,12 @@ export async function POST(request: Request) {
|
|||
temporary: true,
|
||||
};
|
||||
|
||||
auditLog("createTempAlias", alias);
|
||||
await auditLogRaw({
|
||||
action: "createTempAlias",
|
||||
ts: new Date().toISOString(),
|
||||
data: alias,
|
||||
user: user,
|
||||
});
|
||||
return NextResponse.json(alias);
|
||||
});
|
||||
}
|
Loading…
Reference in a new issue