Testing #307

Merged
bones7242 merged 16 commits from testing into master 2017-12-19 00:30:32 +01:00
3 changed files with 1 additions and 4 deletions
Showing only changes of commit 4a75ac7127 - Show all commits

View file

@ -36,7 +36,7 @@ module.exports = {
}, },
authenticateIfNoUserToken (channelName, channelPassword, user) { authenticateIfNoUserToken (channelName, channelPassword, user) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
if (user) { if (user || !channelName) {
return resolve(true); return resolve(true);
} }
return resolve(module.exports.authenticateChannelCredentials(channelName, channelPassword)); return resolve(module.exports.authenticateChannelCredentials(channelName, channelPassword));

View file

@ -135,8 +135,6 @@ const publishFileFunctions = {
} else { } else {
that.showFilePublishFailure(JSON.parse(xhr.response).message); that.showFilePublishFailure(JSON.parse(xhr.response).message);
} }
} else {
console.log('xhr.readyState', xhr.readyState, 'xhr.status', xhr.status);
} }
}; };
// Initiate a multipart/form-data upload // Initiate a multipart/form-data upload

View file

@ -137,7 +137,6 @@ module.exports = (app) => {
logger.debug('publish request rejected, insufficient request parameters'); logger.debug('publish request rejected, insufficient request parameters');
return res.status(400).json({success: false, message: error.message}); return res.status(400).json({success: false, message: error.message});
} }
logger.debug(`/api/publish > name: ${name}, license: ${license} title: "${title}" description: "${description}" channelName: "${channelName}" channelPassword: "${channelPassword}" nsfw: "${nsfw}"`);
// check channel authorization // check channel authorization
authenticateIfNoUserToken(channelName, channelPassword, user) authenticateIfNoUserToken(channelName, channelPassword, user)
.then(authenticated => { .then(authenticated => {