Don't show Day pages
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Peter Stuifzand 2020-06-18 06:54:54 +02:00
parent 0e7d908e2f
commit 345aae3a9f

11
main.go
View File

@ -492,11 +492,17 @@ func (h *graphHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
nodeMap := make(map[string]int)
for key, references := range refs {
if strings.HasSuffix(key, "_2020") {
continue
}
if _, e := nodeMap[key]; !e {
nodeMap[key] = nodeCount
nodeCount += 1
}
for _, item := range references {
if strings.HasSuffix(item.Name, "_2020") {
continue
}
if _, e := nodeMap[item.Name]; !e {
nodeMap[item.Name] = nodeCount
nodeCount += 1
@ -516,9 +522,12 @@ func (h *graphHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
if key == "DONE" {
continue
}
if strings.HasSuffix(key, "_2020") {
continue
}
if toID, e := nodeMap[key]; e {
for _, item := range references {
if item.Name == "Daily_Notes" && strings.HasSuffix(key, "_2020") {
if strings.HasSuffix(item.Name, "_2020") {
continue
}
if fromID, e := nodeMap[item.Name]; e {