Valetudo/backend/lib/webserver/capabilityRouters/WifiScanCapabilityRouter.js

16 lines
416 B
JavaScript

const CapabilityRouter = require("./CapabilityRouter");
class WifiScanCapabilityRouter extends CapabilityRouter {
initRoutes() {
this.router.get("/", async (req, res) => {
try {
res.json(await this.capability.scan());
} catch (e) {
this.sendErrorResponse(req, res, e);
}
});
}
}
module.exports = WifiScanCapabilityRouter;