UNPKG

@fdm-monster/server

Version:

FDM Monster is a bulk OctoPrint manager to set up, configure and monitor 3D printers. Our aim is to provide extremely optimized websocket performance and reliability.

35 lines (34 loc) 1.01 kB
"use strict"; module.exports = { async up (db, client) { const session = client.startSession(); try { await session.withTransaction(async ()=>{ const dbCollection = db.collection("printers"); await dbCollection.updateMany({}, { $set: { enabled: true } }); }); } finally{ await session.endSession(); } }, async down (db, client) { const session = client.startSession(); try { await session.withTransaction(async ()=>{ const dbCollection = db.collection("printers"); await dbCollection.updateMany({}, { unset: { enabled: "" } }); }); } finally{ await session.endSession(); } } }; //# sourceMappingURL=20210907173950-printers-enabled.js.map