chore: update uses

This commit is contained in:
Cory Dransfeldt 2023-08-25 11:28:45 -07:00
parent 5a82f4e7f7
commit da945c1f53
No known key found for this signature in database
4 changed files with 5 additions and 22 deletions

View file

@ -1,18 +0,0 @@
const EleventyFetch = require('@11ty/eleventy-fetch')
module.exports = async function () {
const API_KEY_FATHOM = process.env.API_KEY_FATHOM
const url =
'https://api.usefathom.com/v1/aggregations?entity=pageview&entity_id=RBCOWZTA&aggregates=pageviews&field_grouping=pathname&sort_by=pageviews:desc&limit=10'
const res = EleventyFetch(url, {
duration: '1h',
type: 'json',
fetchOptions: {
headers: {
Authorization: `Bearer ${API_KEY_FATHOM}`,
},
},
}).catch()
const pages = await res
return pages.filter((p) => p.pathname.includes('posts'))
}