fix api X-Ovh-Application header

master
adb 3 years ago
parent 581fadba8f
commit 02d9cc1e76

@ -48,6 +48,7 @@ export class OvhApi{
body, timestamp
});
header['X-Ovh-Consumer'] = this.credentials.consumerKey;
header['X-Ovh-Application'] = this.credentials.applicationName;
await this.sendRequest({path, body, getMethod, header});
}
@ -78,7 +79,7 @@ export class OvhApi{
this.credentials.consumerKey = res.consumerKey;
console.log('please validate on ovh site:');
console.log(res.validationUrl);
await this.rl.question('continue? (Y/n)', () => {
await this.rl.question('continue? (Y/n)', (input) => {
switch (input) {
case 'n': process.exit(); break;
default: return res.consumerKey;

@ -11,6 +11,7 @@
"ovhCredentials": {
"applicationKey": "",
"applicationSecret": "",
"applicationName": "ovh-api-dyndns",
"apiUrl": "https://ca.api.ovh.com/1.0"
}
}
Loading…
Cancel
Save