Ready for release soon.

This commit is contained in:
charlesgauthereau
2025-07-17 09:28:57 +02:00
parent 7abdcd57f9
commit 4d52419247
18 changed files with 1779 additions and 3335 deletions
+9
View File
@@ -6,6 +6,7 @@ import * as drizzleDb from "@/db";
import {db} from "@/db";
import {EDbmsSchema} from "@/db/schema/types";
import {eq} from "drizzle-orm";
import {isUuidv4} from "@/utils/verify-uuid";
export type databaseAgent = {
name: string,
@@ -34,6 +35,14 @@ export async function POST(
const body: Body = await request.json();
const lastContact = new Date();
if (!isUuidv4(agentId)) {
return NextResponse.json(
{error: "agentId is not a valid uuid"},
{status: 500}
);
}
const agent = await db.query.agent.findFirst({
where: eq(drizzleDb.schemas.agent.id, agentId),
+1 -1
View File
@@ -31,7 +31,7 @@ export async function GET(
{status: 403}
);
}
//@ts-ignore
const expiresAt = parseInt(expires, 10);
if (Date.now() > expiresAt) {
return NextResponse.json(