Revert "Sets proper 404 status in most cases" #822
1 changed files with 10 additions and 9 deletions
|
@ -57,15 +57,16 @@ module.exports = (req, res) => {
|
|||
// Workaround, remove when a solution for async httpContext exists
|
||||
const showState = store.getState().show;
|
||||
const assetKeys = Object.keys(showState.assetList);
|
||||
|
||||
if(assetKeys.length !== 0) {
|
||||
res.claimId = showState.assetList[assetKeys[0]].claimId;
|
||||
} else {
|
||||
const channelKeys = Object.keys(showState.channelList);
|
||||
|
||||
if (assetKeys.length !== 0) {
|
||||
res.claimId = showState.assetList[assetKeys[0]].claimId;
|
||||
} else if (channelKeys.length !== 0) {
|
||||
if(channelKeys.length !== 0) {
|
||||
res.claimId = showState.channelList[channelKeys[0]].longId;
|
||||
res.isChannel = true;
|
||||
} else {
|
||||
res.status(404);
|
||||
}
|
||||
}
|
||||
|
||||
// render component to a string
|
||||
|
|
Loading…
Reference in a new issue