Authenticate ping API

This commit is contained in:
Divya Jagadish authored and Zaid Abdulla committed 2022-04-08 12:59:32 -07:00
1 parent 344f0ec5e0
commit 7ccdbace70
1 file changed
+1
+1
View File
@@ -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<void>((resolve) => {
ping(ctx.params.host, (err, parsed) => {
if (parsed) {