- Remove .prettierrc (dead config, Biome replaces Prettier) - Rename lighthouserc.json to lighthouserc.cjs with module.exports for ESM compat - Add logger.warn to empty catch blocks in auth, register, site-settings, prisma-cache, redis, security, rate-limit - Unify ActionResult type: action-helper.ts uses 'ok' consistent with safe-action-shared.ts - Add noUnusedLocals + noUnusedParameters to tsconfig + fix 25 pre-existing unused vars - Replace barrel export src/types/index.ts with direct @/types/common imports - Make trustHost conditional (development only) in auth.ts - Add pre-flight URL validation to update-Nitrov3.sh to catch image.library.url misconfigurations - Improve NITRO_IMAGE_LIBRARY_URL content validation in pre-flight & post-compute checks
26 lines
843 B
TypeScript
26 lines
843 B
TypeScript
import { redirect } from "next/navigation";
|
|
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
|
import { SyncAllClient } from "./sync-all-client";
|
|
|
|
export default async function SyncAllPage() {
|
|
const { session, permissions } = await getAdminContext();
|
|
if (!canAccess(permissions, PERMS.ASSETS_IMPORT, session.user.rank)) {
|
|
redirect("/admin");
|
|
}
|
|
|
|
return (
|
|
<div className="space-y-6">
|
|
<div>
|
|
<h1 className="text-2xl font-bold tracking-tight">Sync All Sources</h1>
|
|
<p className="text-muted-foreground mt-1">
|
|
Scan all configured clone sources and automatically import any
|
|
furniture that is not yet present in your hotel. Missing .nitro files,
|
|
icons, database entries, catalog items, and FurnitureData.json will be
|
|
added automatically.
|
|
</p>
|
|
</div>
|
|
<SyncAllClient />
|
|
</div>
|
|
);
|
|
}
|