base url
Main daploy / deploy (push) Successful in 46s

This commit is contained in:
2024-11-26 21:32:26 +02:00
parent aac8a5ee69
commit b22748d8ac
2 changed files with 4 additions and 1 deletions
+3 -1
View File
@@ -13,12 +13,14 @@ export const createQrCodeDocument = async (
>,
) => {
const uri = Math.abs(Date.now() - EPOHE).toString(36)
const urlBasePrefix = `${import.meta.env.BASE_URL}`.replace(/\/+$/, '')
const url = new URL(`${urlBasePrefix}/read/${uri}`, location.origin).toString()
const qrCodeDoc: QRCodeDocument = {
_id: `qr_code:${uri}`,
type: 'qr_code',
uri,
url: `${import.meta.env.BASE_URL}/read/${uri}`,
url,
user_uuid: getUserUuid(),
browser_uuid: getBrowserUuid(),
created_at: new Date().toISOString(),