type authController correctly, update services accordingly

This commit is contained in:
Alex Holliday committed 2026-03-10 11:18:59 -07:00
1 parent 3e26387b9d
commit 2fdd5a72f0
4 files changed
+89 -78

No files matched your search

+2 -2
View File
@@ -1,5 +1,5 @@
import { AppError } from "@/utils/AppError.js";
import { type MonitorType, MonitorTypes } from "@/types/index.js";
import { type MonitorType, MonitorTypes, UserRole } from "@/types/index.js";
const fetchMonitorCertificate = async (sslChecker: any, monitor: any): Promise<any> => {
const monitorUrl = new URL(monitor.url);
@@ -112,7 +112,7 @@ const requireUserEmail = (userEmail?: string): string => {
return userEmail;
};
export const requireUserRoles = (userRoles?: string[]): string[] => {
export const requireUserRoles = (userRoles?: UserRole[]): UserRole[] => {
if (!userRoles || userRoles.length === 0) {
throw new AppError({ message: "User roles are required", status: 400 });
}