Add the API key to the AJAX requests
This commit is contained in:
@@ -7,7 +7,7 @@ function phpvms_vacentral_airport_lookup(icao, callback) {
|
||||
url: '/api/airports/' + icao + '/lookup',
|
||||
method: 'GET',
|
||||
headers: {
|
||||
'Authorization': PHPVMS_USER_API_KEY
|
||||
'x-api-key': PHPVMS_USER_API_KEY
|
||||
}
|
||||
}).done(function (data, status) {
|
||||
callback(data.data);
|
||||
|
||||
@@ -6,6 +6,9 @@ function changeStatus(values) {
|
||||
url: '/admin/pireps/' + values.pirep_id + '/status',
|
||||
data: values,
|
||||
type: 'POST',
|
||||
headers: {
|
||||
'x-api-key': PHPVMS_USER_API_KEY
|
||||
},
|
||||
success: function (data) {
|
||||
// console.log(data);
|
||||
$(destContainer).replaceWith(data);
|
||||
|
||||
Reference in New Issue
Block a user