From b8e97b5137efebc2d86c864b3f218aad33138313 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Fri, 4 Sep 2026 04:12:43 +0000 Subject: [PATCH] fix(api): corregir tipos en iam_http y warehouse_http para deno check Co-authored-by: alberto.martinez --- api/iam_http.ts | 6 +++--- api/warehouse_http.ts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/api/iam_http.ts b/api/iam_http.ts index daad78c..372a886 100644 --- a/api/iam_http.ts +++ b/api/iam_http.ts @@ -1,11 +1,11 @@ import type { Hono } from "hono"; import type { AuthUser } from "./auth.ts"; import { requireAuth, tenantScope } from "./auth.ts"; -import { callCoreFn } from "./rpc.ts"; -import { respondRpc, routeLabel } from "./http_errors.ts"; +import type { Db } from "./db.ts"; +import { respondRpc } from "./http_errors.ts"; import { requirePermission, callIamFn } from "./permissions.ts"; -type App = Hono<{ Variables: { user: AuthUser } }>; +type App = Hono<{ Variables: { user: AuthUser; db: Db } }>; export function registerIamRoutes(app: App) { app.get("/v1/iam/users", requireAuth, requirePermission("manage_users"), async (c) => { diff --git a/api/warehouse_http.ts b/api/warehouse_http.ts index 89ed384..d9b9b00 100644 --- a/api/warehouse_http.ts +++ b/api/warehouse_http.ts @@ -44,7 +44,7 @@ export function registerWarehouseRoutes(app: App) { }); app.post("/v1/projects/:id/warehouse/close", ...requireCoreAuth, requirePermission("close_warehouse"), async (c) => { - const body = await c.req.json>().catch(() => ({})); + const body = await c.req.json<{ force?: boolean; close_notes?: string }>().catch(() => ({} as { force?: boolean; close_notes?: string })); const db = c.get("db"); const a = actor(c); const env = await callCoreFn(db, "core.fn_warehouse_close_project", {