fix: bugs

This commit is contained in:
qier222 2021-09-25 16:20:53 +08:00
parent 17ef0e927c
commit bb87b7f20d
No known key found for this signature in database
GPG key ID: 9C85007ED905F14D
9 changed files with 54 additions and 41 deletions

View file

@ -22,9 +22,10 @@ const sign = params => {
};
export function auth() {
window.open(
`https://www.last.fm/api/auth/?api_key=${apiKey}&cb=${baseUrl}/#/lastfm/callback`
);
const url = process.env.IS_ELECTRON
? `https://www.last.fm/api/auth/?api_key=${apiKey}&cb=${baseUrl}/#/lastfm/callback`
: `https://www.last.fm/api/auth/?api_key=${apiKey}&cb=${baseUrl}/lastfm/callback`;
window.open(url);
}
export function authGetSession(token) {