From 9ce69e8a85aeccf0048568f4f2842176d38dfb9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=83=9D=E3=83=BC=E3=83=AB=20=E3=82=A6=E3=82=A7=E3=83=83?= =?UTF-8?q?=E3=83=96?= Date: Wed, 10 Oct 2018 16:15:43 -0500 Subject: [PATCH] Closes #177 --- app/client.js | 4 ++-- app/components/client/playground-scripts.js | 2 +- app/helpers/fetch-metadata.js | 4 ++-- app/sockets.js | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/client.js b/app/client.js index 64b77e2..1bf2802 100755 --- a/app/client.js +++ b/app/client.js @@ -13,8 +13,8 @@ import ssr from "choo-ssr"; // U T I L S -const head = local("app/components/head").default; -const wrapper = local("app/components/wrapper").default; +const head = local("/app/components/head").default; +const wrapper = local("/app/components/wrapper").default; diff --git a/app/components/client/playground-scripts.js b/app/components/client/playground-scripts.js index 31ccc3b..fc57dc1 100644 --- a/app/components/client/playground-scripts.js +++ b/app/components/client/playground-scripts.js @@ -176,7 +176,7 @@ curl --header "Content-Type: application/json" document.getElementById("playground-results").innerHTML = `

 # With the LBRY app/daemon running locally, you can use this in your Terminal
-curl --header "Content-Type: application/json" --data '{ "method": "publish", "params": { "name": "TITLE_OF_YOUR_CONTENT", "file_path": "ABSOLUTE_PATH_TO_MEDIA_ON_YOUR_COMPUTER", "bid": "0.001", "metadata": { "description": "DESCRIPTION_OF_YOUR_CONTENT", "title": "TITLE_OF_YOUR_CONTENT", "language": "en", "license": "", "nsfw": false }}}' http://localhost:5279    
+curl --header "Content-Type: application/json" --data '{ "method": "publish", "params": { "name": "${getMemeInfo().name}", "file_path": "ABSOLUTE_PATH_TO_MEDIA_ON_YOUR_COMPUTER", "bid": "0.001", "metadata": { "description": "${getMemeInfo().description}", "title": "${getMemeInfo().title}", "language": "${getMemeInfo().language}", "license": "${getMemeInfo().license}", "nsfw": ${getMemeInfo().nsfw} }}}' http://localhost:5279    
         
diff --git a/app/helpers/fetch-metadata.js b/app/helpers/fetch-metadata.js index 3f64d84..84e998f 100644 --- a/app/helpers/fetch-metadata.js +++ b/app/helpers/fetch-metadata.js @@ -63,12 +63,12 @@ module.exports = exports = (data, socket) => { body.description = dataDetails.description; body.language = dataDetails.language; body.license = dataDetails.license; - body.name = dataDetails.name + "-" + randomString(10); // underscores are not allowed? + body.name = dataDetails.name + "-" + randomString(10); body.nsfw = dataDetails.nsfw; body.title = dataDetails.title; // Gotta let the blockchain know what to save - body.file_path = dataDetails.file_path; // just base64 string + body.file_path = dataDetails.file_path; return uploadImage(body.file_path).then(uploadResponse => { if (!uploadResponse.status || uploadResponse.status !== "ok") { diff --git a/app/sockets.js b/app/sockets.js index 83b9d46..45fbdeb 100644 --- a/app/sockets.js +++ b/app/sockets.js @@ -10,9 +10,9 @@ const request = require("request-promise-native"); // U T I L S -const fetchMetadata = local("app/helpers/fetch-metadata"); -const { generateGitHubFeed } = local("app/helpers/github"); -const logSlackError = local("app/helpers/slack"); +const fetchMetadata = local("/app/helpers/fetch-metadata"); +const { generateGitHubFeed } = local("/app/helpers/github"); +const logSlackError = local("/app/helpers/slack");