feat(housekeeping): cut over administration to ase
This commit is contained in:
1 parent
c9e35cf602
commit
2b8f73a91d
457 files changed
+589
-55936
No files matched your search
@@ -31,10 +31,10 @@ export async function createAd(formData: FormData): Promise<void> {
|
||||
action: "createAd",
|
||||
error: result.error.messageKey,
|
||||
});
|
||||
revalidatePath("/admin/ads");
|
||||
revalidatePath("/ase/content/media/ads");
|
||||
return;
|
||||
}
|
||||
redirect("/admin/ads");
|
||||
redirect("/ase/content/media/ads");
|
||||
}
|
||||
|
||||
export async function updateAd(formData: FormData): Promise<void> {
|
||||
@@ -57,10 +57,10 @@ export async function updateAd(formData: FormData): Promise<void> {
|
||||
id: Number(raw),
|
||||
error: result.error.messageKey,
|
||||
});
|
||||
revalidatePath(`/admin/ads/${raw}`);
|
||||
revalidatePath(`/ase/content/media/ads/${raw}`);
|
||||
return;
|
||||
}
|
||||
redirect("/admin/ads");
|
||||
redirect("/ase/content/media/ads");
|
||||
}
|
||||
|
||||
const deleteAdInput = z.object({
|
||||
@@ -82,7 +82,7 @@ export const deleteAd = adminAction(
|
||||
{ action: "delete", id: ctx.data.id.toString() },
|
||||
);
|
||||
if (!result.ok) throw new ActionError("Advertisement not found");
|
||||
revalidatePath("/admin/ads");
|
||||
revalidatePath("/ase/content/media/ads");
|
||||
return actionOk();
|
||||
},
|
||||
);
|
||||
Reference in new issue
Block a user