diff --git a/helpers/fetch-metadata.js b/helpers/fetch-metadata.js index dead8ee..9904d04 100644 --- a/helpers/fetch-metadata.js +++ b/helpers/fetch-metadata.js @@ -29,40 +29,23 @@ module.exports = exports = (data, socket) => { if (data.step === 2 && !data.data) return; if (data.step === 2) dataDetails = data.data; // file upload - const claimAddress = data.claim; - const resolveMethod = data.method; - - /* - const allowedClaims = [ - "fortnite-top-stream-moments-nickatnyte", - "hellolbry", - "itsadisaster", - "six", - "unbubbled1-1" - ]; - */ - const allowedMethods = [ "publish", "resolve", "wallet_send" ]; + const body = {}; + const claimAddress = data.claim; + const resolveMethod = data.method; + if (allowedMethods.indexOf(resolveMethod) < 0) return socket.send(JSON.stringify({ "details": "Unallowed resolve method for tutorial", "message": "notification", "type": "error" })); - /* - if (data.step === 1 && allowedClaims.indexOf(claimAddress) < 0) return socket.send(JSON.stringify({ - "details": "Invalid claim ID for tutorial", - "message": "notification", - "type": "error" - })); - */ - const body = {}; body.access_token = process.env.LBRY_DAEMON_ACCESS_TOKEN; body.method = resolveMethod; diff --git a/server.js b/server.js index 75bce24..c4bc655 100755 --- a/server.js +++ b/server.js @@ -295,7 +295,7 @@ function generateStep1OfTour(displayTrendingContent) { Promise.all(rawContentCollection).then(collection => { for (const part of collection) { - if (part.value.stream.metadata.thumbnail) { + if (!part.value.stream.metadata.nsfw && part.value.stream.metadata.thumbnail) { renderedContentCollection.push(`
${part.name} diff --git a/views/pages/home.js b/views/pages/home.js index bf59448..ff19815 100755 --- a/views/pages/home.js +++ b/views/pages/home.js @@ -25,7 +25,7 @@ module.exports = exports = () => async () => html`