feat: new middleware

This commit is contained in:
Br0wnHammer committed 2026-02-20 00:34:43 +05:30
1 parent 0974c84b8d
commit 1a52531faf
2 files changed
+11 -1

No files matched your search

@@ -78,6 +78,14 @@ class StatusPageController {
}
const statusPage = await this.statusPageService.getStatusPageByUrl(req.params.url as string);
if (!statusPage.isPublished) {
const teamId = requireTeamId(req?.user?.teamId);
if (statusPage.teamId !== teamId) {
throw new AppError({ message: "Forbidden", status: 403 });
}
}
const settings = await this.settingsService.getDBSettings();
const showURL = settings.showURL;