chore: scrobbling
This commit is contained in:
parent
006255d642
commit
e9aa68e43b
1 changed files with 12 additions and 12 deletions
|
@ -1,13 +1,13 @@
|
||||||
import EleventyFetch from '@11ty/eleventy-fetch';
|
// import EleventyFetch from '@11ty/eleventy-fetch';
|
||||||
import { buildChart } from './helpers/music.js'
|
// import { buildChart } from './helpers/music.js'
|
||||||
|
|
||||||
export default async function () {
|
// export default async function () {
|
||||||
const API_KEY_MUSIC = process.env.API_KEY_MUSIC;
|
// const API_KEY_MUSIC = process.env.API_KEY_MUSIC;
|
||||||
const url = `https://coryd.dev/api/music?key=${API_KEY_MUSIC}`;
|
// const url = `https://coryd.dev/api/music?key=${API_KEY_MUSIC}`;
|
||||||
const res = EleventyFetch(url, {
|
// const res = EleventyFetch(url, {
|
||||||
duration: '1h',
|
// duration: '1h',
|
||||||
type: 'json',
|
// type: 'json',
|
||||||
}).catch();
|
// }).catch();
|
||||||
const resObj = await res;
|
// const resObj = await res;
|
||||||
return buildChart(resObj['data'])
|
// return buildChart(resObj['data'])
|
||||||
}
|
// }
|
||||||
|
|
Reference in a new issue