add file uploads
This commit is contained in:
parent
93027bfd09
commit
2c480909ee
6 changed files with 42 additions and 7 deletions
8
lib.js
8
lib.js
|
@ -9,6 +9,11 @@ function apiStat(res, next, message, success = false, redirect = '/') {
|
|||
next();
|
||||
}
|
||||
|
||||
function splitUp(content) {
|
||||
let out = content.split('\n').map(x => x.split('::'));
|
||||
return out;
|
||||
}
|
||||
|
||||
async function replyIterator(replies, db) {
|
||||
for (let reply of replies) {
|
||||
if (reply.childType == 'hub') {
|
||||
|
@ -31,6 +36,9 @@ async function replyIterator(replies, db) {
|
|||
reply.comment.type = reply.childType;
|
||||
//reply.comment.id = reply.childId;
|
||||
}
|
||||
for (let reply of replies) {
|
||||
reply.comment.content = splitUp(reply.comment.content)
|
||||
}
|
||||
return replies;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue