share landing page bugfixes

This commit is contained in:
tim
2025-04-22 17:21:11 -04:00
parent ff0d71054b
commit 85b2e2dca7

View File

@@ -1,6 +1,5 @@
import {PutObjectCommand, S3Client} from "@aws-sdk/client-s3";
import cors from 'cors'
import {urlencoded} from "express";
import crypto from "crypto";
const SNAPSHOT_URL = process.env.DEXORDER_SNAPSHOT_URL;
@@ -53,7 +52,7 @@ export function initSnapShare(app) {
const imageFilename = req.query.i; // c = snapshot code
const data = {
imageUrl: SNAPSHOT_URL + '/' + imageFilename,
redirectUrl: APP_URL + '/share?d=' + urlencoded(req.query.d), // d=data
redirectUrl: APP_URL + '/shared?d=' + encodeURIComponent(req.query.d), // d=data
};
res.render('share', data);
});