From 8326fbfaabf2d5b179e47511c26dfd0e16c3e59a Mon Sep 17 00:00:00 2001 From: Cory Dransfeldt <coryd@hey.com> Date: Sun, 24 Mar 2024 13:16:55 -0700 Subject: [PATCH] fix: inits --- api/event.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/event.js b/api/event.js index 6fa8f22a..10b9bdc2 100644 --- a/api/event.js +++ b/api/event.js @@ -17,8 +17,8 @@ export default async (request, context) => { if (ns) { const id = crypto.createHash('md5').update(`${context['ip']}${context['geo']['city']}`).digest('hex'); const ids = getStore('ids') - if (!ids.get(id)) ids.set(id, id) - const idVal = ids.get(id) + if (!ids.get(id)) await ids.set(id, id) + const idVal = await ids.get(id) url = `https://cdn.usefathom.com/?h=${encodeURIComponent(page)}&sid=CWSVCDJC&cid=${idVal}` } else { url = `https://cdn.usefathom.com/?h=${encodeURIComponent(page)}&sid=CWSVCDJC&cid=${num}`