chore: debug

This commit is contained in:
Cory Dransfeldt 2024-04-03 19:43:03 -07:00
parent 11cd25bff2
commit e72a17a761
No known key found for this signature in database

View file

@ -1,28 +1,14 @@
import { getStore } from '@netlify/blobs'
import { getStore, setEnvironmentContext } from '@netlify/blobs'
import fs from 'fs'
export const onPreBuild = async ({ constants }) => {
const scrobbles = getStore({
name: 'scrobbles',
options: {
siteID: constants.SITE_ID,
token: constants.NETLIFY_API_TOKEN,
}
})
const artists = getStore({
name: 'artists',
options: {
siteID: constants.SITE_ID,
token: constants.NETLIFY_API_TOKEN,
}
})
const albums = getStore({
name: 'albums',
options: {
siteID: constants.SITE_ID,
token: constants.NETLIFY_API_TOKEN,
}
setEnvironmentContext({
siteID: constants.SITE_ID,
token: constants.NETLIFY_API_TOKEN,
})
const scrobbles = getStore('scrobbles')
const artists = getStore('artists')
const albums = getStore('albums')
const windowData = await scrobbles.get('window', { type: 'json'})
const artistsMap = await artists.get('artists-map', { type: 'json' })
const albumsMap = await albums.get('albums-map', { type: 'json' })