commit
50805ad4ea
2 changed files with 11 additions and 2 deletions
|
@ -3,7 +3,7 @@ import ErrorPage from '@pages/ErrorPage';
|
||||||
import ShowAssetLite from '@pages/ShowAssetLite';
|
import ShowAssetLite from '@pages/ShowAssetLite';
|
||||||
import ShowAssetDetails from '@pages/ShowAssetDetails';
|
import ShowAssetDetails from '@pages/ShowAssetDetails';
|
||||||
import ShowChannel from '@pages/ShowChannel';
|
import ShowChannel from '@pages/ShowChannel';
|
||||||
import { withRouter } from 'react-router-dom';
|
import { withRouter, Redirect } from 'react-router-dom';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
CHANNEL,
|
CHANNEL,
|
||||||
|
@ -23,7 +23,14 @@ class ContentPageWrapper extends React.Component {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
render () {
|
render () {
|
||||||
const { error, requestType } = this.props;
|
const { error, requestType, match } = this.props;
|
||||||
|
const { params } = match;
|
||||||
|
const { claim, identifier } = params;
|
||||||
|
if (identifier) {
|
||||||
|
return <Redirect to={`https://lbry.tv/${identifier}/${claim}`} />
|
||||||
|
} else {
|
||||||
|
return <Redirect to={`https://lbry.tv/${claim}`} />
|
||||||
|
}
|
||||||
if (error) {
|
if (error) {
|
||||||
return (
|
return (
|
||||||
<ErrorPage error={error} />
|
<ErrorPage error={error} />
|
||||||
|
|
|
@ -104,6 +104,7 @@ export default (db, table, sequelize) => ({
|
||||||
.findAll({
|
.findAll({
|
||||||
where: {
|
where: {
|
||||||
name: claimName,
|
name: claimName,
|
||||||
|
claim_type: 1,
|
||||||
publisher_id: channelClaimId,
|
publisher_id: channelClaimId,
|
||||||
bid_state: { [sequelize.Op.or]: ['Controlling', 'Active', 'Accepted'] },
|
bid_state: { [sequelize.Op.or]: ['Controlling', 'Active', 'Accepted'] },
|
||||||
},
|
},
|
||||||
|
@ -215,6 +216,7 @@ export default (db, table, sequelize) => ({
|
||||||
.findAll({
|
.findAll({
|
||||||
where: {
|
where: {
|
||||||
name: claimName,
|
name: claimName,
|
||||||
|
claim_type: 1,
|
||||||
publisher_id: channelId,
|
publisher_id: channelId,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue