mirror of https://github.com/Hypfer/Valetudo.git
16 lines
416 B
JavaScript
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;
|