From dfa6db6276b9a3777b1370824b04c128c74a3b6c Mon Sep 17 00:00:00 2001 From: Thomas Zarebczan Date: Fri, 5 Jun 2020 16:46:39 -0400 Subject: [PATCH 1/3] fix broken claims? https://spee.ch/@Deterrence-Dispensed:2/AR22LR-MagazineKit-1.1 --- server/chainquery/queries/claimQueries.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server/chainquery/queries/claimQueries.js b/server/chainquery/queries/claimQueries.js index 9a4cc1a5..f5c736ca 100644 --- a/server/chainquery/queries/claimQueries.js +++ b/server/chainquery/queries/claimQueries.js @@ -104,6 +104,7 @@ export default (db, table, sequelize) => ({ .findAll({ where: { name: claimName, + claim_type: 1, publisher_id: channelClaimId, bid_state: { [sequelize.Op.or]: ['Controlling', 'Active', 'Accepted'] }, }, @@ -215,6 +216,7 @@ export default (db, table, sequelize) => ({ .findAll({ where: { name: claimName, + claim_type: 1, publisher_id: channelId, }, }) From efc38529c7d835e62bacd2c544dd412df2aaa073 Mon Sep 17 00:00:00 2001 From: jessop Date: Wed, 10 Jun 2020 17:01:44 -0400 Subject: [PATCH 2/3] redirect content to lbry.tv --- client/src/pages/ContentPageWrapper/view.jsx | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/client/src/pages/ContentPageWrapper/view.jsx b/client/src/pages/ContentPageWrapper/view.jsx index 9a1cdb3f..79d6b2c3 100644 --- a/client/src/pages/ContentPageWrapper/view.jsx +++ b/client/src/pages/ContentPageWrapper/view.jsx @@ -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 } from 'react-router-dom'; +import { withRouter, Redirect } from 'react-router-dom'; import { CHANNEL, @@ -23,7 +23,14 @@ class ContentPageWrapper extends React.Component { } } render () { - const { error, requestType } = this.props; + const { error, requestType, match } = this.props; + const { params } = match; + const { claim, identifier } = params; + if (identifier) { + return + } else { + return + } if (error) { return ( From 67e198db2f02629cd18a57ca05f8d465f9eca941 Mon Sep 17 00:00:00 2001 From: jessop Date: Thu, 11 Jun 2020 12:29:26 -0400 Subject: [PATCH 3/3] prevent server side redirect --- client/src/pages/ContentPageWrapper/view.jsx | 20 +++++++++++--------- server/routes/index.js | 2 +- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/client/src/pages/ContentPageWrapper/view.jsx b/client/src/pages/ContentPageWrapper/view.jsx index 79d6b2c3..2a1671d3 100644 --- a/client/src/pages/ContentPageWrapper/view.jsx +++ b/client/src/pages/ContentPageWrapper/view.jsx @@ -15,21 +15,23 @@ 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) { - return + if (identifier && claim) { + return ; + } else if (identifier) { + // return } else { - return + return ; } if (error) { return ( @@ -38,13 +40,13 @@ class ContentPageWrapper extends React.Component { } switch (requestType) { case CHANNEL: - return ; + // return ; case ASSET_LITE: - return ; + // return ; case ASSET_DETAILS: - return ; + // return ; case SPECIAL_ASSET: - return ; + // return ; default: return

loading...

; } diff --git a/server/routes/index.js b/server/routes/index.js index fffdf3cd..6f8ab4fe 100644 --- a/server/routes/index.js +++ b/server/routes/index.js @@ -2,6 +2,6 @@ module.exports = { ...require('./pages').default, ...require('./api').default, ...require('./auth').default, - ...require('./assets').default, + // ...require('./assets').default, ...require('./fallback').default, };