Use turbo & fix anonymous functions

This commit is contained in:
skidoodle 2022-10-25 19:53:49 +02:00
parent 3d9fde82c8
commit 4d9964623f
9 changed files with 1161 additions and 19 deletions

View file

@ -1,7 +1,7 @@
import { NextApiRequest, NextApiResponse } from 'next';
import { SpotifyService } from 'spotify-now-playing'
export default async function (req: NextApiRequest, res: NextApiResponse) {
export default async function Spotify(req: NextApiRequest, res: NextApiResponse) {
const { CLIENT_ID, CLIENT_SECRET, REFRESH_TOKEN } = process.env;
const spotify = new SpotifyService(CLIENT_ID!, CLIENT_SECRET!, REFRESH_TOKEN!)
const song = await spotify.getCurrentSong()