diff --git a/lib/ui/api.ts b/lib/ui/api.ts index 4e43a73..b3d4178 100644 --- a/lib/ui/api.ts +++ b/lib/ui/api.ts @@ -660,6 +660,7 @@ router.post("/devices/:id/tags", async (ctx) => { }); router.get("/ping/:host", async (ctx) => { + if (!ctx.state.user) return void (ctx.status = 401); return new Promise((resolve) => { ping(ctx.params.host, (err, parsed) => { if (parsed) {