diff --git a/backend/src/routes/authRoutes.js b/backend/src/routes/authRoutes.js index 9ca0a03..bdff526 100644 --- a/backend/src/routes/authRoutes.js +++ b/backend/src/routes/authRoutes.js @@ -847,12 +847,10 @@ router.post( // Get accepted release notes versions let acceptedVersions = []; try { - if (prisma.release_notes_acceptances) { - acceptedVersions = await prisma.release_notes_acceptances.findMany({ - where: { user_id: user.id }, - select: { version: true }, - }); - } + acceptedVersions = await prisma.release_notes_acceptances.findMany({ + where: { user_id: user.id }, + select: { version: true }, + }); } catch (error) { // If table doesn't exist yet or Prisma client not regenerated, use empty array console.warn( @@ -1010,12 +1008,10 @@ router.post( // Get accepted release notes versions let acceptedVersions = []; try { - if (prisma.release_notes_acceptances) { - acceptedVersions = await prisma.release_notes_acceptances.findMany({ - where: { user_id: user.id }, - select: { version: true }, - }); - } + acceptedVersions = await prisma.release_notes_acceptances.findMany({ + where: { user_id: user.id }, + select: { version: true }, + }); } catch (error) { // If table doesn't exist yet or Prisma client not regenerated, use empty array console.warn( diff --git a/backend/src/routes/hostRoutes.js b/backend/src/routes/hostRoutes.js index 1b5667a..c71bc42 100644 --- a/backend/src/routes/hostRoutes.js +++ b/backend/src/routes/hostRoutes.js @@ -625,7 +625,14 @@ router.post( if (req.body.diskDetails) updateData.disk_details = req.body.diskDetails; // Network Information - if (req.body.gatewayIp) updateData.gateway_ip = req.body.gatewayIp; + if (req.body.gatewayIp) { + updateData.gateway_ip = req.body.gatewayIp; + } else if (Object.hasOwn(req.body, "gatewayIp")) { + // Log warning if gateway field was sent but empty (isolated network) + console.warn( + `Host ${host.hostname} reported with no default gateway configured`, + ); + } if (req.body.dnsServers) updateData.dns_servers = req.body.dnsServers; if (req.body.networkInterfaces) updateData.network_interfaces = req.body.networkInterfaces; diff --git a/biome.json b/biome.json index f81ca03..24499dd 100644 --- a/biome.json +++ b/biome.json @@ -1,5 +1,5 @@ { - "$schema": "https://biomejs.dev/schemas/2.3.4/schema.json", + "$schema": "https://biomejs.dev/schemas/2.3.11/schema.json", "vcs": { "enabled": true, "clientKind": "git",