projects
/
vchess.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
95a6603
)
Fix the 'empty news bug'
author
Benjamin Auder
<benjamin.auder@somewhere>
Fri, 20 Mar 2020 09:30:24 +0000
(10:30 +0100)
committer
Benjamin Auder
<benjamin.auder@somewhere>
Fri, 20 Mar 2020 09:30:24 +0000
(10:30 +0100)
server/routes/news.js
patch
|
blob
|
blame
|
history
diff --git
a/server/routes/news.js
b/server/routes/news.js
index
51d8c82
..
af7f6ac
100644
(file)
--- a/
server/routes/news.js
+++ b/
server/routes/news.js
@@
-24,8
+24,8
@@
router.get("/news", access.ajax, (req,res) => {
router.get("/newsts", access.ajax, (req,res) => {
// Special query for footer: just return timestamp of last news
- NewsModel.getTimestamp((err,ts) => {
- res.json(err || { timestamp:
ts.added
});
+ NewsModel.getTimestamp((err,
ts) => {
+ res.json(err || { timestamp:
!!ts ? ts.added : 0
});
});
});