passed second set of user tests
This commit is contained in:
parent
9a93b3cc8d
commit
4a75ac7127
3 changed files with 1 additions and 4 deletions
|
@ -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));
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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 => {
|
||||||
|
|
Loading…
Reference in a new issue