From 1b6fe7894734e3c8faa352713212c097672e957e Mon Sep 17 00:00:00 2001 From: Daniel Lugo Date: Wed, 24 Jun 2020 17:40:09 -0400 Subject: [PATCH] typos --- services/gunDB/contact-api/actions.js | 17 +++++++++++++++++ services/gunDB/contact-api/key.js | 2 ++ 2 files changed, 19 insertions(+) diff --git a/services/gunDB/contact-api/actions.js b/services/gunDB/contact-api/actions.js index 01c51740..0c516f70 100644 --- a/services/gunDB/contact-api/actions.js +++ b/services/gunDB/contact-api/actions.js @@ -1295,6 +1295,22 @@ const createPost = async (tags, title, content) => { pageIdx = Number(pageIdx + 1).toString() } + await new Promise(res => { + require('../Mediator') + .getUser() + .get(Key.WALL) + .get(Key.PAGES) + .get(pageIdx) + .get(Key.COUNT) + .put(count + 1, ack => { + if (ack.err) { + throw new Error(ack.err) + } + + res() + }) + }) + /** @type {string} */ const postID = await new Promise((res, rej) => { const _n = require('../Mediator') @@ -1302,6 +1318,7 @@ const createPost = async (tags, title, content) => { .get(Key.WALL) .get(Key.PAGES) .get(pageIdx) + .get(Key.POSTS) .set( { date: Date.now(), diff --git a/services/gunDB/contact-api/key.js b/services/gunDB/contact-api/key.js index 35269545..0c130712 100644 --- a/services/gunDB/contact-api/key.js +++ b/services/gunDB/contact-api/key.js @@ -53,3 +53,5 @@ exports.COUNT = 'count' exports.CONTENT_ITEMS = 'contentItems' exports.FOLLOWS = 'follows' + +exports.POSTS = 'posts'