fix: build error

This commit is contained in:
Br0wnHammer
2026-02-20 00:52:36 +05:30
parent 1a52531faf
commit c27bb0e7f1
@@ -1,10 +1,14 @@
import { NextFunction, Request, Response } from "express";
import { IStatusPagesRepository } from "@/repositories/index.js";
import { AppError } from "@/utils/AppError.js";
export const createVerifyStatusPageAccess = (statusPagesRepository: IStatusPagesRepository) => {
return async (req: Request, res: Response, next: NextFunction) => {
try {
const url = req.params.url;
if (!url) {
throw new AppError({ message: "Status page URL is required", status: 400 });
}
const statusPage = await statusPagesRepository.findByUrl(url);
if (statusPage.isPublished) {
next(); // Published — proceed to controller (no JWT)