passed second set of user tests

This commit is contained in:
bill bittner 2017-12-15 11:19:10 -08:00
parent 9a93b3cc8d
commit 4a75ac7127
3 changed files with 1 additions and 4 deletions

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 => {