aboutsummaryrefslogtreecommitdiff
path: root/src/server/index.js
diff options
context:
space:
mode:
authorMark Powers <mark@marks.kitchen>2021-01-02 10:50:13 -0600
committerMark Powers <mark@marks.kitchen>2021-01-02 10:50:13 -0600
commit7ebbf4627626f219620258dc09f8a75696026142 (patch)
treec98f231369da7b34ac5901b29c92dc650011f785 /src/server/index.js
parent6b4724c8d2a2d625b6ff947a90c9c216eba6a800 (diff)
Fix date month formatting and add category undefined check
Diffstat (limited to 'src/server/index.js')
-rw-r--r--src/server/index.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/server/index.js b/src/server/index.js
index c34e9d6..582d482 100644
--- a/src/server/index.js
+++ b/src/server/index.js
@@ -42,7 +42,7 @@ function consumeMessage(res){
}
}
function dateToString(d){
- return `${d.getFullYear().toString()}/${d.getMonth().toString()}/${d.getDate().toString()}`
+ return `${d.getFullYear().toString()}/${(d.getMonth()+1).toString()}/${d.getDate().toString()}`
}
function setUpRoutes(models, jwtFunctions, database, templates) {