This commit is contained in:
Fred KISSIE
2026-03-10 18:54:26 +01:00
parent 6686de6788
commit 61ec938b00
11 changed files with 191 additions and 312 deletions

View File

@@ -40,7 +40,9 @@ const getResourcePolicySchema = z
})
);
async function query(params: z.infer<typeof getResourcePolicySchema>) {
export async function queryResourcePolicy(
params: z.infer<typeof getResourcePolicySchema>
) {
const conditions: SQL<unknown>[] = [];
if ("resourcePolicyId" in params) {
conditions.push(
@@ -158,7 +160,7 @@ async function query(params: z.infer<typeof getResourcePolicySchema>) {
}
export type GetResourcePolicyResponse = NonNullable<
Awaited<ReturnType<typeof query>>
Awaited<ReturnType<typeof queryResourcePolicy>>
>;
registry.registerPath({
@@ -205,7 +207,7 @@ export async function getResourcePolicy(
);
}
const policy = await query(parsedParams.data);
const policy = await queryResourcePolicy(parsedParams.data);
if (!policy) {
return next(