Merge pull request #1070 from lbryio/master

cut staging from master
This commit is contained in:
jessopb 2020-06-10 17:14:01 -04:00 committed by GitHub
commit 50805ad4ea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 2 deletions

View file

@ -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} />

View file

@ -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,
}, },
}) })