Skip to content

Commit 5ec4cf8

Browse files
committed
Fix US login
1 parent 3415e53 commit 5ec4cf8

3 files changed

Lines changed: 6 additions & 2 deletions

File tree

src/constants/america.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export interface AmericaBrandEnvironment {
99
}
1010

1111
const getHyundaiEnvironment = (): AmericaBrandEnvironment => {
12-
const host = 'prd.eu-ccapi.hyundai.com:8080';
12+
const host = 'api.telematics.hyundaiusa.com';
1313
const baseUrl = `https://${host}`;
1414
return {
1515
brand: 'hyundai',

src/controllers/american.controller.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,9 @@ export class AmericanController extends SessionController<AmericanBlueLinkyConfi
7878
password: this.userConfig.password,
7979
},
8080
headers: {
81-
'client_secret': this.environment.clientSecret,
81+
'User-Agent': 'PostmanRuntime/7.26.10',
8282
'client_id': this.environment.clientId,
83+
'client_secret': this.environment.clientSecret,
8384
},
8485
json: true,
8586
});

src/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,11 @@ class BlueLinky<
6565
}
6666

6767
on(event: 'ready', fnc: (vehicles: VEHICLE_TYPE[]) => void): this;
68+
69+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
6870
on(event: 'error', fnc: (error: any) => void): this;
6971

72+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
7073
on(event: string|symbol, listener: (...args: any[]) => void): this {
7174
return super.on(event, listener);
7275
}

0 commit comments

Comments
 (0)