Cleaning up the JS code.

This commit is contained in:
Scott Idem
2020-02-19 14:37:40 -05:00
parent 8a6123762b
commit 46f0762511
9 changed files with 1106 additions and 1150 deletions

View File

@@ -331,6 +331,27 @@ exports.v2_get_event_location_presenters = async function (axios, event_location
}
exports.v2_get_event_files = async function (axios, event_id) {
console.log('Requesting event files...');
const url = '/v2/event/'+event_id+'/event_files';
const data = await axios.get(url)
.then(function (response) {
console.log('v2 location files data: ***');
console.log(response.data);
console.log('v2 location files data: ^^^');
//data = response.data;
return response.data;
})
.catch(function (error) {
console.log(error);
return error;
});
return data;
}
exports.v2_get_event_location_files = async function (axios, event_location_id) {
console.log('Requesting location files...');
const url = '/v2/event_location/'+event_location_id+'/event_files';
@@ -350,3 +371,66 @@ exports.v2_get_event_location_files = async function (axios, event_location_id)
return data;
}
exports.v2_get_event_location_files_sessions = async function (axios, event_location_id) {
console.log('Requesting all session files for a location...');
const url = '/v2/event_location/'+event_location_id+'/event_files/sessions';
const data = await axios.get(url)
.then(function (response) {
console.log('v2 location files data: ***');
console.log(response.data);
console.log('v2 location files data: ^^^');
//data = response.data;
return response.data;
})
.catch(function (error) {
console.log(error);
return error;
});
return data;
}
exports.v2_get_event_location_files_presentations = async function (axios, event_location_id) {
console.log('Requesting all presentation files for a location...');
const url = '/v2/event_location/'+event_location_id+'/event_files/presentations';
const data = await axios.get(url)
.then(function (response) {
console.log('v2 location files data: ***');
console.log(response.data);
console.log('v2 location files data: ^^^');
//data = response.data;
return response.data;
})
.catch(function (error) {
console.log(error);
return error;
});
return data;
}
exports.v2_get_event_location_files_presenters = async function (axios, event_location_id) {
console.log('Requesting all presenter files for a location...');
const url = '/v2/event_location/'+event_location_id+'/event_files/presenters';
const data = await axios.get(url)
.then(function (response) {
console.log('v2 location files data: ***');
console.log(response.data);
console.log('v2 location files data: ^^^');
//data = response.data;
return response.data;
})
.catch(function (error) {
console.log(error);
return error;
});
return data;
}