fix(api): corregir tipos en iam_http y warehouse_http para deno check

Co-authored-by: alberto.martinez <alberto.martinez@mrdev.mx>
This commit is contained in:
Cursor Agent 2026-09-04 04:12:43 +00:00
parent ab89727522
commit b8e97b5137
No known key found for this signature in database
2 changed files with 4 additions and 4 deletions

View file

@ -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) => {

View file

@ -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<Record<string, unknown>>().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", {