aboutsummaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/main.go b/main.go
index 69e8902..3eb47c0 100644
--- a/main.go
+++ b/main.go
@@ -293,6 +293,12 @@ func main() {
http.HandleFunc("/news/", func(w http.ResponseWriter, r *http.Request){
timestamp := r.URL.Path[6:]
+
+ if(len(timestamp) < 2) {
+ AllNewsGet(w, r, db)
+ return
+ }
+
if timestamp[len(timestamp)-1:] == "/" {
timestamp = timestamp[:len(timestamp)-1]
}