feat: fixed server cfg stale in replication

This commit is contained in:
Akhil Mohan
2024-02-07 11:36:13 +05:30
parent 609b224ca9
commit 61ff732ec0
8 changed files with 31 additions and 38 deletions
+1 -1
View File
@@ -79,7 +79,7 @@ export const registerSamlRouter = async (server: FastifyZodProvider) => {
// eslint-disable-next-line
async (req, profile, cb) => {
try {
const serverCfg = getServerCfg();
const serverCfg = await getServerCfg();
if (!profile) throw new BadRequestError({ message: "Missing profile" });
const { firstName } = profile;
const email = profile?.email ?? (profile?.emailAddress as string); // emailRippling is added because in Rippling the field `email` reserved