add VITE_READ_BASE_URL
Main daploy / deploy (push) Successful in 41s

This commit is contained in:
2024-11-27 09:23:22 +02:00
parent 27f3aa3344
commit 8c472ce309
2 changed files with 6 additions and 2 deletions
+2 -1
View File
@@ -1 +1,2 @@
VITE_API_URL=https://hereconnect.condev.ru/api
VITE_API_URL=https://hereconnect.condev.ru/api
VITE_READ_BASE_URL=https://r.condev.ru
+4 -1
View File
@@ -13,7 +13,10 @@ export const createQrCodeDocument = async (
>,
) => {
const uri = Math.abs(Date.now() - EPOHE).toString(36)
const url = new URL(`/read/${uri}`, location.origin).toString()
const url = new URL(
`${import.meta.env.VITE_READ_BASE_URL || '/read'}/${uri}`,
location.origin,
).toString()
const qrCodeDoc: QRCodeDocument = {
_id: `qr_code:${uri}`,