chore(release): 1.2.5-rc.3

This commit is contained in:
charlesgauthereau
2026-02-01 19:16:42 +01:00
parent b9f0d9279b
commit 8f5e0686c8
4 changed files with 15 additions and 15 deletions
+10 -13
View File
@@ -185,9 +185,14 @@ import {Readable} from "node:stream";
export async function POST(request: Request, { params }: { params: Promise<{ agentId: string }> }) {
try {
console.log("POST");
console.log("data");
const agentId = (await params).agentId;
const headers = request.headers;
console.log("headers", headers);
console.log("agentId", agentId);
const generatedId = headers.get("x-generated-id");
const status = headers.get("x-status");
const encryptedAesKeyHex = headers.get("x-aes-key");
@@ -243,21 +248,13 @@ export async function POST(request: Request, { params }: { params: Promise<{ age
const fileExt = extension || getFileExtension(database.dbms);
const fileName = `${uuidv4()}${fileExt}`;
// const nodeStream = webStreamToNode(request.body as any);
// const tmpPath = await new Promise<string | null>((resolve, reject) => {
// pipeline(nodeStream, decipher, async (err) => {
// if (err) return reject(err);
// try {
// const path = await saveStreamToTempFile(decipher, fileName);
// resolve(path);
// } catch (e) {
// reject(e);
// }
// });
// });
const nodeStream = webStreamToNode(request.body!);
const tmpPath = await saveStreamToTempFile(decipher, fileName);
const tmpPath = await saveStreamToTempFile(
nodeStream.pipe(decipher),
fileName
);
if (!tmpPath) {
return NextResponse.json({ error: "Unable to save temporary backup file" }, { status: 500 });