chore: improve caching + reporting

This commit is contained in:
Cory Dransfeldt 2024-03-27 04:38:49 -07:00
parent 97106a685e
commit f8cdb78215
No known key found for this signature in database
2 changed files with 8 additions and 10 deletions

View file

@ -33,17 +33,15 @@ export default async (request, context) => {
{ headers: { "Content-Type": "application/json" } }
)
if (!userId) {
await ids.set(id, id)
if (ns) {
url = setUrl(id, 'noscript visit')
} else {
url = setUrl(id, 'Blocked visit')
}
}
if (!userId) await ids.set(id, id)
userId = await ids.get(id)
if (ns) {
url = setUrl(userId, 'noscript visit')
} else {
url = setUrl(userId, 'Blocked visit')
}
fetch(url, { headers })
.then((data) => {
console.log(data);