mirror of
https://github.com/OneUptime/oneuptime
synced 2024-11-23 07:42:10 +00:00
21 lines
501 B
TypeScript
21 lines
501 B
TypeScript
import { find, update } from '../util/db';
|
|
|
|
const statusPageCollection = 'statuspages';
|
|
|
|
async function run() {
|
|
const statusPages = await find(statusPageCollection, {
|
|
hideResolvedIncident: { $exists: false },
|
|
});
|
|
|
|
for (let i = 0; i < statusPages.length; i++) {
|
|
const statusPage = statusPages[i];
|
|
await update(
|
|
statusPageCollection,
|
|
{ _id: statusPage._id },
|
|
{ hideResolvedIncident: false }
|
|
);
|
|
}
|
|
}
|
|
|
|
export default run;
|