diff --git a/OvhApi.js b/OvhApi.js index 1bd8081..b76acc1 100644 --- a/OvhApi.js +++ b/OvhApi.js @@ -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; diff --git a/example.config.json b/example.config.json index 26ea3ed..87a9aa8 100644 --- a/example.config.json +++ b/example.config.json @@ -11,6 +11,7 @@ "ovhCredentials": { "applicationKey": "", "applicationSecret": "", + "applicationName": "ovh-api-dyndns", "apiUrl": "https://ca.api.ovh.com/1.0" } } \ No newline at end of file