mirror of
https://github.com/jellyfin/jellyfin-sdk-typescript.git
synced 2025-02-21 06:32:19 +00:00
Fix issues with axios update
This commit is contained in:
parent
f4ecc5546a
commit
0c7218fca9
@ -44,7 +44,7 @@ describe('Api', () => {
|
||||
|
||||
const requestData = mockAxios.request.mock.calls[0][0];
|
||||
expect(requestData.url).toBe(`${SERVER_URL}/Users/AuthenticateByName`);
|
||||
expect(requestData.headers[AUTHORIZATION_HEADER]).toBe(getAuthorizationHeader(TEST_CLIENT, TEST_DEVICE));
|
||||
expect(requestData.headers?.[AUTHORIZATION_HEADER]).toBe(getAuthorizationHeader(TEST_CLIENT, TEST_DEVICE));
|
||||
expect(requestData.data).toBe(JSON.stringify(USER_CREDENTIALS));
|
||||
|
||||
expect(api.accessToken).toBe(TEST_ACCESS_TOKEN);
|
||||
|
@ -61,7 +61,7 @@ export class Api {
|
||||
/**
|
||||
* Convenience method for logging out and updating the internal state.
|
||||
*/
|
||||
logout(): Promise<AxiosResponse> {
|
||||
logout(): Promise<AxiosResponse<never> | AxiosResponse<void>> {
|
||||
return this.sessionApi.reportSessionEnded().then(response => {
|
||||
this.accessToken = '';
|
||||
return response;
|
||||
|
Loading…
x
Reference in New Issue
Block a user