From e8139ef878d3d4c73e5af066058ff5a90cc1c123 Mon Sep 17 00:00:00 2001 From: Raymonzut <40148684+Raymonzut@users.noreply.github.com> Date: Thu, 14 May 2020 20:18:22 +0200 Subject: [PATCH] Remove unused function readPostsDelayed --- server/routes/api/posts.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/server/routes/api/posts.js b/server/routes/api/posts.js index acef258..e21795a 100644 --- a/server/routes/api/posts.js +++ b/server/routes/api/posts.js @@ -10,10 +10,6 @@ let posts = readPosts(); setInterval(() => posts = readPosts(), 1000 * 60 * 60) -function readPostsDelayed() { - return new Promise(setTimeout, 1000).then(posts = readPosts()) -} - function readPosts() { console.warn("reading all posts") const files = fs.readdirSync(posts_dir)