add admin checks for admin pages and run biome formating 🔨
All checks were successful
Build and Push Docker Images / Build and Push Docker Images (push) Successful in 11m8s

This commit is contained in:
2025-07-25 13:31:12 +05:00
parent aedf7cdf7d
commit 9b2f2c1528
127 changed files with 6577 additions and 6334 deletions

View File

@ -17,7 +17,7 @@ export default async function UserDevices({
}) {
const query = (await searchParams)?.query || "";
const session = await getServerSession(authOptions);
if (session?.user?.is_admin !== true) redirect("/devices?page=1");
if (!session?.user?.is_admin) redirect("/devices?page=1");
return (
<div>
<div className="flex justify-between items-center border rounded-md border-dashed font-bold title-bg py-4 px-2 mb-4">
@ -55,7 +55,7 @@ export default async function UserDevices({
label: "Device User",
type: "string",
placeholder: "User name or id card",
}
},
]}
/>
</div>