mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-15 21:16:17 +02:00
fix subsonic login error: use status instead
This commit is contained in:
@@ -94,7 +94,7 @@ export const SubsonicController: ControllerEndpoint = {
|
||||
};
|
||||
}
|
||||
|
||||
await ssApiClient({ server: null, url: cleanServerUrl }).authenticate({
|
||||
const resp = await ssApiClient({ server: null, url: cleanServerUrl }).authenticate({
|
||||
query: {
|
||||
c: 'Feishin',
|
||||
f: 'json',
|
||||
@@ -103,6 +103,10 @@ export const SubsonicController: ControllerEndpoint = {
|
||||
},
|
||||
});
|
||||
|
||||
if (resp.status !== 200) {
|
||||
throw new Error('Failed to log in');
|
||||
}
|
||||
|
||||
return {
|
||||
credential,
|
||||
userId: null,
|
||||
|
||||
Reference in New Issue
Block a user