mirror of
https://github.com/Portabase/portabase.git
synced 2026-07-14 11:16:13 +02:00
chore(release): 1.2.5-rc.3
This commit is contained in:
+1
-1
@@ -26,5 +26,5 @@ keywords:
|
||||
- web-ui
|
||||
- agent
|
||||
license: Apache-2.0
|
||||
version: 1.2.5-rc.2
|
||||
version: 1.2.5-rc.3
|
||||
date-released: "2026-02-01"
|
||||
|
||||
@@ -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 });
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "portabase",
|
||||
"version": "1.2.5-rc.2",
|
||||
"version": "1.2.5-rc.3",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "next dev --turbopack -p 8887",
|
||||
|
||||
@@ -88,6 +88,9 @@ router.post("/:agentId", async (req: Request, res: Response) => {
|
||||
|
||||
const tmpPath = await saveStreamToTempFile(decryptedStream, fileName);
|
||||
|
||||
|
||||
|
||||
|
||||
if (!tmpPath) {
|
||||
return res.status(500).json({
|
||||
error: "Unable to save tmp backup file",
|
||||
|
||||
Reference in New Issue
Block a user