Skip to content

Commit

Permalink
fix(vendor.roborock): The S6 does not support the MapSnapshotCapability
Browse files Browse the repository at this point in the history
  • Loading branch information
Hypfer committed Apr 28, 2024
1 parent b3417d2 commit 7362514
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 0 additions & 1 deletion backend/lib/robots/roborock/RoborockS6ValetudoRobot.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ class RoborockS6ValetudoRobot extends RoborockValetudoRobot {
}));

[
capabilities.RoborockMapSnapshotCapability,
capabilities.RoborockMultiMapPersistentMapControlCapability,
capabilities.RoborockMultiMapMapResetCapability,
capabilities.RoborockMapSegmentationCapability,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ const ValetudoMapSnapshot = require("../../entities/core/ValetudoMapSnapshot");
class MapSnapshotCapabilityRouter extends CapabilityRouter {
initRoutes() {
this.router.get("/", async (req, res) => {
res.json(await this.capability.getSnapshots());
try {
res.json(await this.capability.getSnapshots());
} catch (e) {
this.sendErrorResponse(req, res, e);
}
});

this.router.put("/", this.validator, async (req, res) => {
Expand Down

0 comments on commit 7362514

Please sign in to comment.