Merge pull request #3205 from bluewave-labs/fix/types

fix types
This commit is contained in:
Alexander Holliday
2026-01-27 13:19:13 -08:00
committed by GitHub
2 changed files with 5 additions and 6 deletions
@@ -50,7 +50,7 @@ class StatusPageController {
await createStatusPageBodyValidation.validateAsync(req.body);
await imageValidation.validateAsync(req.file);
const teamId = requireTeamId(req?.user?.teamId);
const statusPageId = req.params.id;
const statusPageId = req.params.id as string;
if (!statusPageId) {
throw new AppError({ message: "Status page ID is required", status: 400 });
}
@@ -77,7 +77,7 @@ class StatusPageController {
throw new AppError({ message: "Status page URL is required", status: 400 });
}
const statusPage = await this.statusPageService.getStatusPageByUrl(req.params.url);
const statusPage = await this.statusPageService.getStatusPageByUrl(req.params.url as string);
const settings = await this.settingsService.getDBSettings();
const showURL = settings.showURL;
@@ -116,7 +116,7 @@ class StatusPageController {
deleteStatusPage = async (req: Request, res: Response, next: NextFunction) => {
try {
const statusPageId = req.params.id;
const statusPageId = req.params.id as string;
if (!statusPageId) {
throw new AppError({ message: "Status page ID is required", status: 400 });
}
@@ -1,5 +1,4 @@
import mongoose from "mongoose";
import { BulkWriteResult } from "mongodb";
const CHECKS_COLLECTION = "checks";
const BACKUP_COLLECTION = "checks_backup";
@@ -144,14 +143,14 @@ const migrateBackupData = async (backedUp: boolean): Promise<MigrationStats> =>
operations.push({ insertOne: { document: { ...rest, metadata } } });
if (operations.length >= BATCH_SIZE) {
const result: BulkWriteResult = await target.bulkWrite(operations, { ordered: false });
const result = await target.bulkWrite(operations, { ordered: false });
stats.totalMigrated += result.insertedCount;
operations.length = 0;
}
}
if (operations.length) {
const result: BulkWriteResult = await target.bulkWrite(operations, { ordered: false });
const result = await target.bulkWrite(operations, { ordered: false });
stats.totalMigrated += result.insertedCount;
}