fix: build error
This commit is contained in:
1 parent
1a52531faf
commit
c27bb0e7f1
1 file changed
+4
@@ -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