Skip to content

Commit 0ceeab8

Browse files
Dean SoferDean Sofer
authored andcommitted
Trying to fix spotify tokens
1 parent 613a8dd commit 0ceeab8

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ jobs:
3434
run: |
3535
sed -i "s/__APIFY_TOKEN__/${APIFY_TOKEN}/g" map.js
3636
sed -i "s/__GOOGLE_TOKEN__/${GOOGLE_TOKEN}/g" index.html
37-
sed -i "s/YOUR_SPOTIFY_CLIENT_ID/${SPOTIFY_CLIENT_ID}/g" 19hz/map.js
38-
sed -i "s/YOUR_SPOTIFY_CLIENT_SECRET/${SPOTIFY_CLIENT_SECRET}/g" 19hz/map.js
37+
sed -i "s/__SPOTIFY_CLIENT_ID__/${SPOTIFY_CLIENT_ID}/g" 19hz/map.js
38+
sed -i "s/__SPOTIFY_CLIENT_SECRET__/${SPOTIFY_CLIENT_SECRET}/g" 19hz/map.js
3939
4040
- name: Setup Pages
4141
uses: actions/configure-pages@v4

19hz/map.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ const CATEGORY_DELIMITER = '~';
44

55
// Spotify API configuration
66
// For production, these should be loaded from environment variables or a secure backend
7-
const SPOTIFY_CLIENT_ID = 'YOUR_SPOTIFY_CLIENT_ID';
8-
const SPOTIFY_CLIENT_SECRET = 'YOUR_SPOTIFY_CLIENT_SECRET';
7+
const SPOTIFY_CLIENT_ID = '__SPOTIFY_CLIENT_ID__';
8+
const SPOTIFY_CLIENT_SECRET = '__SPOTIFY_CLIENT_SECRET__';
99

1010
// Cache for Spotify access token
1111
let spotifyAccessToken = null;
@@ -80,7 +80,7 @@ async function searchSpotifyArtist(artistName) {
8080

8181
try {
8282
const response = await fetch(
83-
`https://api.spotify.com/v1/search?q=${encodeURIComponent(artistName)}&type=artist&limit=1`,
83+
`https://api.spotify.com/v1/search?q=artist:${encodeURIComponent(artistName)}&type=artist&limit=1`,
8484
{
8585
headers: {
8686
'Authorization': `Bearer ${token}`

0 commit comments

Comments
 (0)