feat(cms): improve catalog, editorial recovery and operations
This commit is contained in:
1 parent
2fead134e6
commit
c389c3893d
122 files changed
+8137
-703
No files matched your search
@@ -15,3 +15,20 @@ export async function resolveCmsError(data: FormData) {
|
||||
});
|
||||
revalidatePath("/admin/devops/cms-errors");
|
||||
}
|
||||
|
||||
export async function assignCmsError(data: FormData) {
|
||||
const staff = await requirePermission(PERMS.DEVOPS_EDIT);
|
||||
const mode = data.get("assignment");
|
||||
if (mode !== "self" && mode !== "clear")
|
||||
throw new Error("Invalid assignment operation");
|
||||
const fingerprint = String(data.get("fingerprint") ?? "");
|
||||
const userId = mode === "self" ? staff.id : null;
|
||||
await new ErrorStore().assign(fingerprint, userId);
|
||||
await logAudit({
|
||||
userId: staff.id,
|
||||
action: "cms.error.assign",
|
||||
target: "cms-error",
|
||||
after: { fingerprint, assignedUserId: userId },
|
||||
});
|
||||
revalidatePath("/admin/devops/cms-errors");
|
||||
}
|
||||
Reference in new issue
Block a user