From 7e996a207d975ff7e0a6309b757376cbc9e89230 Mon Sep 17 00:00:00 2001 From: boufni95 Date: Mon, 25 May 2020 17:47:30 +0200 Subject: [PATCH 1/2] gun err --- src/routes.js | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/routes.js b/src/routes.js index 918aadc0..1c36cc01 100644 --- a/src/routes.js +++ b/src/routes.js @@ -436,12 +436,14 @@ module.exports = async ( }); + /* const feedObj = { feed: [ { id:'bd7acbea-c1b1-46c2-aed5-3ad53abb28ba', paragraphs:[ "SOme text and stuff 12" + "SOme text and stuff" ], profilePic:"", username:"bobni", @@ -491,6 +493,13 @@ module.exports = async ( user.get("FEED_POC").put(JSON.stringify(feedObj), ack => { if (ack.err) { //rej(new Error(ack.err)) + }*/ + const feedObj = { + feed :{} + } + user.get("FEED_POC").put(feedObj, ack => { + if (ack.err) { + //rej(ack.err) logger.log(ack.err) } else { logger.log(ack.err) @@ -1677,7 +1686,7 @@ module.exports = async ( res.json(channelBackups); }); }); - + const GunEvent = Common.Constants.Event const Key = require('../services/gunDB/contact-api/key') @@ -1695,7 +1704,7 @@ module.exports = async ( res.json({ok:"err"}) } }) - app.get("/api/gun/feedpoc", async (req,res) =>{ + app.get("api/gun/feedpoc", async (req,res) =>{ try{ logger.warn("FEED POC") const user = require('../services/gunDB/Mediator').getUser() @@ -1709,7 +1718,7 @@ module.exports = async ( }) const Events = require('../services/gunDB/contact-api/events') - + app.get(`/api/gun/${GunEvent.ON_RECEIVED_REQUESTS}`, (_, res) => { try { // spinup From a9f2bc5063ce86885479e85e7b8b004b3c340779 Mon Sep 17 00:00:00 2001 From: Daniel Lugo Date: Mon, 22 Jun 2020 16:51:25 -0400 Subject: [PATCH 2/2] slash --- src/routes.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes.js b/src/routes.js index 1c36cc01..e4b59ba4 100644 --- a/src/routes.js +++ b/src/routes.js @@ -1704,7 +1704,7 @@ module.exports = async ( res.json({ok:"err"}) } }) - app.get("api/gun/feedpoc", async (req,res) =>{ + app.get("/api/gun/feedpoc", async (req,res) =>{ try{ logger.warn("FEED POC") const user = require('../services/gunDB/Mediator').getUser()