Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions components/onesignal_rest_api/onesignal_rest_api.app.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,20 @@ export default {
return this.$auth.rest_api_key;
},
_apiUrl() {
return "https://onesignal.com/api/v1";
return "https://api.onesignal.com";
},
async _makeRequest(path, options = {}, $ = this) {
const config = {
...options,
url: `${this._apiUrl()}/${path}`,
headers: {
Authorization: `Basic ${this._accessApiKey()}`,
Authorization: `Key ${this._accessApiKey()}`,
},
data: {
...options.data,
params: {
...options.params,
app_id: this._accessAppId(),
},
data: options.data,
};

return axios($, config);
Expand Down
Loading