refactor workflows api

This commit is contained in:
Joao Correia
2025-02-02 11:11:52 +00:00
parent b684262759
commit 16545d2075
10 changed files with 39 additions and 39 deletions

View File

@@ -9,7 +9,7 @@ import { User } from "@/interfaces/user";
import { sessionOptions } from "@/lib/session";
import { redirect, serialize } from "@/utils";
import { requestUser } from "@/utils/api";
import { getConfiguredWorkflows } from "@/utils/approval.workflows.be";
import { getApprovalWorkflows } from "@/utils/approval.workflows.be";
import { getEntities } from "@/utils/entities.be";
import { shouldRedirectHome } from "@/utils/navigation.disabled";
import { getSpecificUsers } from "@/utils/users.be";
@@ -36,7 +36,7 @@ export const getServerSideProps = withIronSessionSsr(async ({ req, res }) => {
if (shouldRedirectHome(user) || !["admin", "developer", "teacher", "corporate", "mastercorporate"].includes(user.type))
return redirect("/")
const workflows = await getConfiguredWorkflows();
const workflows = await getApprovalWorkflows("configured-workflows");
const allAssigneeIds: string[] = [
...new Set(