mirror of
https://github.com/bluewave-labs/Checkmate.git
synced 2026-05-18 07:28:31 -05:00
fix: build error
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user