removed unnecessary console logs
This commit is contained in:
parent
288a19ea97
commit
c573865c63
12 changed files with 1 additions and 27 deletions
|
@ -26,12 +26,10 @@ function publishNewChannel (event) {
|
|||
// validate submission
|
||||
validateNewChannelSubmission(userName, password)
|
||||
.then(() => {
|
||||
console.log('new channel creation is in progress');
|
||||
showChannelCreateInProgressDisplay();
|
||||
return sendAuthRequest(userName, password, '/signup') // post the request
|
||||
})
|
||||
.then(result => {
|
||||
console.log('new channel successfully created', result);
|
||||
showChannelCreateDoneDisplay();
|
||||
// refresh window logged in as the channel
|
||||
setUserCookies(result.channelName, result.channelClaimId, result.shortChannelId); // set cookies
|
||||
|
|
|
@ -15,12 +15,10 @@ function drop_handler(event) {
|
|||
}
|
||||
|
||||
function dragover_handler(event) {
|
||||
console.log('dragover');
|
||||
event.preventDefault();
|
||||
}
|
||||
|
||||
function dragend_handler(event) {
|
||||
console.log('dragend');
|
||||
var dt = event.dataTransfer;
|
||||
if (dt.items) {
|
||||
for (var i = 0; i < dt.items.length; i++) {
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
function getRequest (url) {
|
||||
console.log('making GET request to', url)
|
||||
return new Promise((resolve, reject) => {
|
||||
let xhttp = new XMLHttpRequest();
|
||||
xhttp.open('GET', url, true);
|
||||
|
@ -20,7 +19,6 @@ function getRequest (url) {
|
|||
}
|
||||
|
||||
function postRequest (url, params) {
|
||||
console.log('making POST request to', url)
|
||||
return new Promise((resolve, reject) => {
|
||||
let xhttp = new XMLHttpRequest();
|
||||
xhttp.open('POST', url, true);
|
||||
|
@ -63,7 +61,6 @@ function toggleSection(event){
|
|||
}
|
||||
|
||||
function createProgressBar(element, size){
|
||||
console.log('creating progress bar');
|
||||
var x = 0;
|
||||
var adder = 1;
|
||||
// create the bar holder & place it
|
||||
|
|
|
@ -49,7 +49,6 @@ function loginToChannel (event) {
|
|||
event.preventDefault()
|
||||
validateNewChannelLogin(userName, password)
|
||||
.then(() => {
|
||||
console.log('channel login in progress');
|
||||
// send request
|
||||
return sendAuthRequest(userName, password, '/login')
|
||||
})
|
||||
|
@ -74,7 +73,6 @@ function loginToChannel (event) {
|
|||
if (error.name){
|
||||
showError(loginErrorDisplayElement, error.message);
|
||||
} else {
|
||||
console.log('login failure:', error);
|
||||
showError(loginErrorDisplayElement, 'There was an error logging into your channel');
|
||||
}
|
||||
})
|
||||
|
|
|
@ -1,13 +1,11 @@
|
|||
function toggleNavBarSelection (value) {
|
||||
const selectedOption = value;
|
||||
if (selectedOption === 'LOGOUT') {
|
||||
console.log('log out');
|
||||
// remove session cookies
|
||||
clearUserCookies();
|
||||
// send logout request to server
|
||||
window.location.href = '/logout';
|
||||
} else if (selectedOption === 'VIEW') {
|
||||
console.log('view channel');
|
||||
// get channel info
|
||||
const channelName = getCookie('channel_name');
|
||||
const channelClaimId = getCookie('channel_claim_id');
|
||||
|
|
|
@ -17,15 +17,12 @@ function previewAndStageFile(selectedFile){
|
|||
const thumbnailSelectionInput = document.getElementById('claim-thumbnail-input');
|
||||
// validate the file's name, type, and size
|
||||
try {
|
||||
console.log('validating file');
|
||||
validateFile(selectedFile);
|
||||
} catch (error) {
|
||||
console.log('file validation failed with error:', error);
|
||||
showError(fileSelectionInputError, error.message);
|
||||
return;
|
||||
}
|
||||
// set the image preview, if an image was provided
|
||||
console.log('file type:', selectedFile.type)
|
||||
if (selectedFile.type !== 'video/mp4') {
|
||||
if (selectedFile.type === 'image/gif') {
|
||||
assetPreview.innerHTML = `<p>loading preview...</p>`
|
||||
|
|
|
@ -108,7 +108,6 @@ function checkAvailability(name, successDisplayElement, errorDisplayElement, val
|
|||
// check to make sure it is available
|
||||
isNameAvailable(name, apiUrl)
|
||||
.then(result => {
|
||||
console.log('result:', result)
|
||||
if (result === true) {
|
||||
hideError(errorDisplayElement);
|
||||
showSuccess(successDisplayElement)
|
||||
|
@ -142,7 +141,6 @@ function checkChannelName(name){
|
|||
|
||||
// validation function which checks all aspects of the publish submission
|
||||
function validateFilePublishSubmission(stagedFiles, claimName, channelName){
|
||||
console.log(`validating publish submission > name: ${claimName} channel: ${channelName} file:`, stagedFiles);
|
||||
return new Promise(function (resolve, reject) {
|
||||
// 1. make sure 1 file was staged
|
||||
if (!stagedFiles) {
|
||||
|
@ -206,10 +204,8 @@ function validateNewChannelSubmission(userName, password){
|
|||
isNameAvailable(channelName, '/api/isChannelAvailable/') // validate the availability
|
||||
.then(result => {
|
||||
if (result) {
|
||||
console.log('channel is available');
|
||||
resolve();
|
||||
} else {
|
||||
console.log('channel is not available');
|
||||
reject(new ChannelNameError('Sorry, that name is already taken'));
|
||||
}
|
||||
})
|
||||
|
|
|
@ -161,7 +161,7 @@ module.exports = (app) => {
|
|||
// serve content
|
||||
db.getShortChannelIdFromLongChannelId(params.longId, params.name)
|
||||
.then(shortId => {
|
||||
console.log('sending back short channel id', shortId);
|
||||
logger.debug('sending back short channel id', shortId);
|
||||
res.status(200).json(shortId);
|
||||
})
|
||||
.catch(error => {
|
||||
|
|
|
@ -56,8 +56,6 @@ module.exports = (app) => {
|
|||
app.get('/embed/:claimId/:name', ({ params }, res) => {
|
||||
const claimId = params.claimId;
|
||||
const name = params.name;
|
||||
console.log('claimId ==', claimId);
|
||||
console.log('name ==', name);
|
||||
// get and render the content
|
||||
res.status(200).render('embed', { layout: 'embed', claimId, name });
|
||||
});
|
||||
|
|
|
@ -47,9 +47,7 @@ function extractPageFromClaims (claims, pageNumber) {
|
|||
logger.debug('claims is array?', Array.isArray(claims));
|
||||
logger.debug(`pageNumber ${pageNumber} is number?`, Number.isInteger(pageNumber));
|
||||
const claimStartIndex = (pageNumber - 1) * CLAIMS_PER_PAGE;
|
||||
console.log('claim start index:', claimStartIndex);
|
||||
const claimEndIndex = claimStartIndex + 10;
|
||||
console.log('claim end index:', claimEndIndex);
|
||||
const pageOfClaims = claims.slice(claimStartIndex, claimEndIndex);
|
||||
logger.debug('page of claims:', pageOfClaims);
|
||||
return pageOfClaims;
|
||||
|
|
|
@ -144,9 +144,7 @@
|
|||
event.file.meta.license = license;
|
||||
event.file.meta.nsfw = nsfw;
|
||||
event.file.meta.type = stagedFiles[0].type;
|
||||
console.log('anonymous?', anonymous);
|
||||
if (!anonymous) {
|
||||
console.log('channel:', channel);
|
||||
event.file.meta.channel = channel;
|
||||
}
|
||||
if (thumbnail && (thumbnail.trim !== '')){
|
||||
|
|
|
@ -45,7 +45,6 @@
|
|||
// show or hide the channel selection tools
|
||||
function toggleChannel (selectedOption) {
|
||||
const channelSelectOptions = document.getElementById('channel-select-options');
|
||||
console.log('toggleChannel event triggered', selectedOption);
|
||||
// show/hide the login and new channel forms
|
||||
if (selectedOption === 'anonymous') {
|
||||
channelSelectOptions.hidden = true;
|
||||
|
@ -66,7 +65,6 @@
|
|||
function toggleSelectedChannel (selectedChannel) {
|
||||
const createChannelTool = document.getElementById('channel-create-details');
|
||||
const loginToChannelTool = document.getElementById('channel-login-details');
|
||||
console.log('toggleSelectedChannel event triggered', selectedChannel);
|
||||
// show/hide the login and new channel forms
|
||||
if (selectedChannel === 'new') {
|
||||
createChannelTool.hidden = false;
|
||||
|
|
Loading…
Add table
Reference in a new issue