oneuptime/init-script/scripts/3.0.9316.ts
Nawaz Dhandala afd62f21ce
fix lint
2022-03-22 14:33:55 +00:00

21 lines
511 B
TypeScript

import { find, update } from '../util/db';
const statusPageCollection = 'statuspages';
async function run() {
const statusPages = await find(statusPageCollection, {
multipleNotificationTypes: { $exists: false },
});
for (let i = 0; i < statusPages.length; i++) {
const statusPage = statusPages[i];
await update(
statusPageCollection,
{ _id: statusPage._id },
{ multipleNotificationTypes: false }
);
}
}
export default run;