From 2130adedb3a766268a73950cd21ac3a21e20bdeb Mon Sep 17 00:00:00 2001 From: Blake Matthes Date: Thu, 13 Mar 2025 15:40:10 -0500 Subject: [PATCH] refactor(auth): added in timeout for adding new roles to make sure everything else is connected 1st --- server/services/auth/authService.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/services/auth/authService.ts b/server/services/auth/authService.ts index 6ce6ffe..a8282f4 100644 --- a/server/services/auth/authService.ts +++ b/server/services/auth/authService.ts @@ -12,7 +12,9 @@ import {areRolesIn} from "./utils/roleCheck.js"; const app = new OpenAPIHono(); // run the role check -areRolesIn(); +setTimeout(() => { + areRolesIn(); +}, 5000); app.route("auth/login", login); app.route("auth/register", register);