Removed spotify... its hard to maintain and also fuck spotify
Some checks failed
Docker Deploy / build-and-push (push) Has been cancelled
Some checks failed
Docker Deploy / build-and-push (push) Has been cancelled
This commit is contained in:
@@ -1,41 +0,0 @@
|
||||
interface SpotifyCredentials {
|
||||
clientId: string;
|
||||
clientSecret: string;
|
||||
refreshToken: string;
|
||||
accessToken?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Spotify credentials from environment variables
|
||||
* Checks both process.env and import.meta.env for compatibility
|
||||
*/
|
||||
export function getSpotifyCredentials(): SpotifyCredentials | null {
|
||||
const clientId =
|
||||
process.env.SPOTIFY_CLIENT_ID || import.meta.env.SPOTIFY_CLIENT_ID;
|
||||
const clientSecret =
|
||||
process.env.SPOTIFY_CLIENT_SECRET ||
|
||||
import.meta.env.SPOTIFY_CLIENT_SECRET;
|
||||
const refreshToken =
|
||||
process.env.SPOTIFY_REFRESH_TOKEN ||
|
||||
import.meta.env.SPOTIFY_REFRESH_TOKEN;
|
||||
const accessToken =
|
||||
process.env.SPOTIFY_ACCESS_TOKEN || import.meta.env.SPOTIFY_ACCESS_TOKEN;
|
||||
|
||||
if (!clientId || !clientSecret || !refreshToken) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return {
|
||||
clientId,
|
||||
clientSecret,
|
||||
refreshToken,
|
||||
accessToken,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if Spotify integration is properly configured
|
||||
*/
|
||||
export function isSpotifyConfigured(): boolean {
|
||||
return getSpotifyCredentials() !== null;
|
||||
}
|
||||
Reference in New Issue
Block a user