Revert "run eslint pre-hook"

This reverts commit 7391df8e84.
This commit is contained in:
Shawn 2018-12-09 23:18:39 -06:00
parent 81cc5a8323
commit 4684e28fdb
3 changed files with 4 additions and 15 deletions

View file

@ -58,11 +58,7 @@ const autoblockPublishBodyMiddleware = (req, res, next) => {
let ip = (req.headers['x-forwarded-for'] || req.connection.remoteAddress).split(/,\s?/)[0];
const { channelName } = req.body;
<<<<<<< HEAD
if (channelName && publishingChannelWhitelist.indexOf(channelName.toLowerCase()) !== -1) {
=======
if (channelName && publishingChannelWhitelist.indexOf(channelName) !== -1) {
>>>>>>> run eslint pre-hook
delete ipCounts[ip];
}
}

View file

@ -27,11 +27,7 @@ function logMetricsMiddleware (req, res, next) {
db.Metrics.create({
time : Date.now(),
<<<<<<< HEAD
isInternal: /node-fetch/.test(userAgent),
=======
isInternal: /node\-fetch/.test(userAgent),
>>>>>>> run eslint pre-hook
isChannel : res.isChannel,
claimId : res.claimId,
routePath : httpContext.get('routePath'),

View file

@ -53,23 +53,20 @@ module.exports = (req, res) => {
const runSaga = (action !== false && saga !== false);
const renderPage = (store) => {
// Workaround, remove when a solution for async httpContext exists
const showState = store.getState().show;
const assetKeys = Object.keys(showState.assetList);
<<<<<<< HEAD
if(assetKeys.length !== 0) {
=======
if (assetKeys.length !== 0) {
>>>>>>> run eslint pre-hook
res.claimId = showState.assetList[assetKeys[0]].claimId;
} else {
const channelKeys = Object.keys(showState.channelList);
if (channelKeys.length !== 0) {
if(channelKeys.length !== 0) {
res.claimId = showState.channelList[channelKeys[0]].longId;
res.isChannel = true;
}
}
}
// render component to a string
@ -122,7 +119,7 @@ module.exports = (req, res) => {
console.log(`redirecting ${req.originalUrl} to ${canonicalUrl}`);
res.redirect(canonicalUrl);
}
return renderPage(store);
return renderPage(store)
});
} else {
const store = createStore(Reducers);