diff --git a/lib/Handler.js b/lib/Handler.js index 4f7a6e9..51aa81b 100644 --- a/lib/Handler.js +++ b/lib/Handler.js @@ -14,7 +14,7 @@ const request = require("./Request"); module.exports = class { /** * - * @param {String} token your API token. + * @param {String} token your API Authorization. * @see {link} https://sayonika.maidcafe.cf/developers */ constructor(token) { @@ -28,7 +28,7 @@ module.exports = class { */ getMod(id) { return new Promise((resolve, reject) => { - request("GET", `https://sayonika.maidcafe.cf/api/v1/mods/${id}`, {headers: {Token: this.token}}).then(res => { + request("GET", `https://sayonika.maidcafe.cf/api/v1/mods/${id}`, {headers: {Authorization: this.token}}).then(res => { resolve(res.body); }).catch(reject); }); @@ -41,7 +41,7 @@ module.exports = class { */ getAllMods(page) { return new Promise((resolve, reject) => { - request('GET', `https://sayonika.maidcafe.cf/api/v1/mods?page=${page}`, {headers: {Token: this.token}}).then(res => { + request('GET', `https://sayonika.maidcafe.cf/api/v1/mods?page=${page}`, {headers: {Authorization: this.token}}).then(res => { resolve(res.body); }).catch(reject); }); @@ -54,7 +54,7 @@ module.exports = class { */ getUser(id) { return new Promise((resolve, reject) => { - request("GET", `https://sayonika.maidcafe.cf/api/v1/users/${id}`, {headers: {Token: this.token}}).then(res => { + request("GET", `https://sayonika.maidcafe.cf/api/v1/users/${id}`, {headers: {Authorization: this.token}}).then(res => { resolve(res.body); }).catch(reject); }); @@ -67,7 +67,7 @@ module.exports = class { */ getAllUsers(page) { return new Promise((resolve, reject) => { - request('GET', `https://sayonika.maidcafe.cf/api/v1/users?page=${page}`, {headers: {Token: this.token}}).then(res => { + request('GET', `https://sayonika.maidcafe.cf/api/v1/users?page=${page}`, {headers: {Authorization: this.token}}).then(res => { resolve(res.body); }).catch(reject); });