Initial commit

This commit is contained in:
admin
2026-05-26 22:46:00 +02:00
commit 7e2c2ff89c
256 changed files with 51523 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
"use server";
import { revalidatePath } from "next/cache";
import { cookies } from "next/headers";
import { setAppSetting } from "@/lib/db/appSettings";
import { isValidSort, SORT_COOKIE } from "@/lib/sort";
const ONE_YEAR = 60 * 60 * 24 * 365;
export async function setDefaultSort(sort: string) {
if (!isValidSort(sort)) return;
setAppSetting("defaultSort", sort);
(await cookies()).set(SORT_COOKIE, sort, {
path: "/",
maxAge: ONE_YEAR,
sameSite: "lax",
});
revalidatePath("/");
revalidatePath("/collection");
revalidatePath("/actress");
revalidatePath("/studios");
revalidatePath("/series");
}