Compare commits

..

No commits in common. "master" and "updateMessaging" have entirely different histories.

3 changed files with 9 additions and 21 deletions
client/src/pages/ContentPageWrapper
server
chainquery/queries
routes

View file

@ -3,7 +3,7 @@ import ErrorPage from '@pages/ErrorPage';
import ShowAssetLite from '@pages/ShowAssetLite';
import ShowAssetDetails from '@pages/ShowAssetDetails';
import ShowChannel from '@pages/ShowChannel';
import { withRouter, Redirect } from 'react-router-dom';
import { withRouter } from 'react-router-dom';
import {
CHANNEL,
@ -15,24 +15,15 @@ import {
class ContentPageWrapper extends React.Component {
componentDidMount () {
const { onHandleShowPageUri, match, homeChannel } = this.props;
//onHandleShowPageUri(homeChannel ? { claim: homeChannel } : match.params);
onHandleShowPageUri(homeChannel ? { claim: homeChannel } : match.params);
}
componentWillReceiveProps (nextProps) {
if (nextProps.match.params !== this.props.match.params) {
//this.props.onHandleShowPageUri(nextProps.match.params);
this.props.onHandleShowPageUri(nextProps.match.params);
}
}
render () {
const { error, requestType, match } = this.props;
const { params } = match;
const { claim, identifier } = params;
if (identifier && claim) {
return <Redirect to={`https://lbry.tv/${identifier}/${claim}`} />;
} else if (identifier) {
// return <Redirect to={`https://lbry.tv/${identifier}/`} />
} else {
return <Redirect to={`https://lbry.tv/${claim}`} />;
}
const { error, requestType } = this.props;
if (error) {
return (
<ErrorPage error={error} />
@ -40,13 +31,13 @@ class ContentPageWrapper extends React.Component {
}
switch (requestType) {
case CHANNEL:
// return <ShowChannel />;
return <ShowChannel />;
case ASSET_LITE:
// return <ShowAssetLite />;
return <ShowAssetLite />;
case ASSET_DETAILS:
// return <ShowAssetDetails />;
return <ShowAssetDetails />;
case SPECIAL_ASSET:
// return <ShowChannel />;
return <ShowChannel />;
default:
return <p>loading...</p>;
}

View file

@ -82,7 +82,6 @@ export default (db, table, sequelize) => ({
};
const selectWhere = {
...whereClause,
claim_type: 1,
publisher_id: channelClaimId,
};
return await table
@ -104,7 +103,6 @@ export default (db, table, sequelize) => ({
.findAll({
where: {
name: claimName,
claim_type: 1,
publisher_id: channelClaimId,
bid_state: { [sequelize.Op.or]: ['Controlling', 'Active', 'Accepted'] },
},
@ -216,7 +214,6 @@ export default (db, table, sequelize) => ({
.findAll({
where: {
name: claimName,
claim_type: 1,
publisher_id: channelId,
},
})

View file

@ -2,6 +2,6 @@ module.exports = {
...require('./pages').default,
...require('./api').default,
...require('./auth').default,
// ...require('./assets').default,
...require('./assets').default,
...require('./fallback').default,
};