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

21 lines
481 B
TypeScript

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