better initialization
This commit is contained in:
parent
552e625e5f
commit
39c01733d7
1 changed files with 14 additions and 7 deletions
|
|
@ -1301,14 +1301,21 @@ const createPost = async (tags, title, content) => {
|
||||||
.get(Key.WALL)
|
.get(Key.WALL)
|
||||||
.get(Key.PAGES)
|
.get(Key.PAGES)
|
||||||
.get(pageIdx)
|
.get(pageIdx)
|
||||||
.get(Key.COUNT)
|
.put(
|
||||||
.put(shouldBeNewPage ? 1 : count + 1, ack => {
|
{
|
||||||
if (ack.err) {
|
[Key.COUNT]: shouldBeNewPage ? 1 : count + 1,
|
||||||
throw new Error(ack.err)
|
posts: {
|
||||||
}
|
unused: null
|
||||||
|
}
|
||||||
|
},
|
||||||
|
ack => {
|
||||||
|
if (ack.err) {
|
||||||
|
throw new Error(ack.err)
|
||||||
|
}
|
||||||
|
|
||||||
res()
|
res()
|
||||||
})
|
}
|
||||||
|
)
|
||||||
})
|
})
|
||||||
|
|
||||||
/** @type {string} */
|
/** @type {string} */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue