feat: unarchive editorials and restore archived grants
Adds an "Archivierung aufheben" action on the editorial detail page: clears the archive markers, reactivates suspended accounts and re-activates exactly the album grants that were revoked by the archive step (matched via the archive timestamp, skipping albums that received a fresh active grant in the meantime).
This commit is contained in:
1 parent
c9d3f3d1dc
commit
9308b46d84
4 files changed
+135
-4
No files matched your search
@@ -55,6 +55,16 @@ export async function archiveEditorialAction(editorialId: string): Promise<void>
|
||||
redirect("/admin/redaktionen");
|
||||
}
|
||||
|
||||
export async function unarchiveEditorialAction(editorialId: string): Promise<void> {
|
||||
const admin = await requireAdmin(new Headers(await headers()));
|
||||
await editorialService.unarchiveEditorial({
|
||||
editorialId,
|
||||
adminUserId: admin.userId,
|
||||
});
|
||||
revalidatePath(`/admin/redaktionen/${editorialId}`);
|
||||
revalidatePath("/admin/redaktionen");
|
||||
}
|
||||
|
||||
export async function hardDeleteEditorialAction(editorialId: string): Promise<void> {
|
||||
await requireAdmin(new Headers(await headers()));
|
||||
await editorialService.hardDeleteEditorial(editorialId);
|
||||
|
||||
Reference in new issue
Block a user