refactor: implement session checking utility, enhance device queries with session validation, and improve UI interactions for device management
This commit is contained in:
@@ -123,11 +123,7 @@ export async function blockDevice({
|
||||
if (!macAddress) {
|
||||
throw new Error("macAddress is a required parameter");
|
||||
}
|
||||
// const device = await prisma.device.findFirst({
|
||||
// where: {
|
||||
// mac: macAddress,
|
||||
// },
|
||||
// });
|
||||
|
||||
try {
|
||||
const baseUrl: string = process.env.OMADA_BASE_URL || "";
|
||||
const url: string = `${baseUrl}/api/v2/sites/${process.env.OMADA_SITE_ID}/cmd/clients/${formatMacAddress(macAddress)}/${type}`;
|
||||
|
||||
Reference in New Issue
Block a user