fix: log job when storage file missing for restoration

This commit is contained in:
Charles GTE
2026-07-11 09:59:06 +02:00
parent 1e17413e52
commit c418ea01e2
6 changed files with 164 additions and 115 deletions
+2 -14
View File
@@ -1,8 +1,8 @@
import { NextResponse } from "next/server";
import { handleDatabases } from "./helpers";
import { handleDatabases } from "@/features/agents/utils/status/status.helpers";
import { Body } from "@/features/agents/types";
import * as drizzleDb from "@/db";
import { db } from "@/db";
import { EDbmsSchema } from "@/db/schema/types";
import { and, eq } from "drizzle-orm";
import { withUpdatedAt } from "@/db/utils";
import { logger } from "@/lib/logger";
@@ -10,18 +10,6 @@ import { isUUID } from "@/utils/text";
const log = logger.child({ module: "api/agent/status/route" });
export type databaseAgent = {
name: string;
dbms: EDbmsSchema;
generatedId: string;
pingStatus: boolean;
};
export type Body = {
version: string;
databases: databaseAgent[];
};
export async function POST(
request: Request,
{ params }: { params: Promise<{ agentId: string }> },