diff --git a/logs/log.log b/logs/log.log index d8c0578..184adc5 100644 --- a/logs/log.log +++ b/logs/log.log @@ -1406,3 +1406,6 @@ err, crashed!" 1629304119258 | Dumping config: 1629304119264 | {"debug":false,"logging":1337,"logfile":"logs/log.log","ipget_endpoint_set":"//derzombiiie.com/getip.php?settoken=${TOKEN}","ipget_endpoint_get":"//derzombiiie.com/getip.php?token=${TOKEN}","cl":true,"site_name":"blog.derzombiiie.com","search_enable":false,"search_only_tags":true,"commenting_enabled":true,"post_ranking_auto":43200,"index_post_sort":"new","comment_sync_on_write":false,"comment_auto_sync":360} 1629304397288 | Reading posts sorted by "new" with a length of 10 +--- SEPERATOR --- +--- SEPERATOR --- +--- SEPERATOR --- diff --git a/node/app.js b/node/app.js index 2e112b5..9e5667a 100644 --- a/node/app.js +++ b/node/app.js @@ -177,6 +177,10 @@ con.registercmd( "post", (arg => { function shutdown() { log.log("Shutting down", log.d.basic) log.clearBUFF() + + postsDB.sync() + commentDB.sync() + process.exit(1) } diff --git a/node/comments.js b/node/comments.js index 34fffa8..7bdd97a 100644 --- a/node/comments.js +++ b/node/comments.js @@ -15,7 +15,6 @@ this.push = (post, comment) => { } this.get = (post, len) => { -debugger if ( !post ) return {"type":"err","text":"no post"} if ( !typeof(len) == "number" || !typeof(len) == "undefined" ) return {"type":"err","text":"bad length"} diff --git a/storage/comments.json b/storage/comments.json index 6f2f929..f35b1df 100644 --- a/storage/comments.json +++ b/storage/comments.json @@ -33,5 +33,5 @@ "body": "This is a test to test\nif the authorinfo works correctly!", "id": 3 }, - "0-len": 4 -} + "0-len": 4 +} \ No newline at end of file diff --git a/storage/posts.json b/storage/posts.json index 0fad6a1..4b9ada2 100644 --- a/storage/posts.json +++ b/storage/posts.json @@ -37,4 +37,4 @@ "id": 1 }, "len": 1 -} +} \ No newline at end of file