add create, delete, list for idp org policy

This commit is contained in:
miloschwartz
2025-04-15 10:16:15 -04:00
parent e86640547e
commit 432f38333e
9 changed files with 375 additions and 14 deletions

View File

@@ -1,7 +1,7 @@
import { Request, Response, NextFunction } from "express";
import { z } from "zod";
import { db } from "@server/db";
import { domains, orgDomains, users } from "@server/db/schemas";
import { domains, idp, orgDomains, users } from "@server/db/schemas";
import response from "@server/lib/response";
import HttpCode from "@server/types/HttpCode";
import createHttpError from "http-errors";
@@ -69,7 +69,7 @@ export async function listIdps(
const [{ count }] = await db
.select({ count: sql<number>`count(*)` })
.from(domains);
.from(idp);
return response<ListIdpResponse>(res, {
data: {