Skip to content

armgit / memos

Public Imported from GitHub
0

Memos is an open-source, self-hosted note-taking app that brings your everyday thoughts together in a personal timeline. Your data stays yours, and you choose what to keep private or share.

fix: heatmap show on wrong date (#2243)

Vespa31458026c52eaeb
diff --git a/api/v1/memo.go b/api/v1/memo.go
index fe3c37f6a..fcfd59925 100644
--- a/api/v1/memo.go
+++ b/api/v1/memo.go
@@ -505,11 +505,11 @@ func (s *APIV1Service) GetMemoStats(c echo.Context) error {
displayTsList := []int64{}
if memoDisplayWithUpdatedTs {
for _, memo := range list {
- displayTsList = append(displayTsList, memo.CreatedTs)
+ displayTsList = append(displayTsList, memo.UpdatedTs)
}
} else {
for _, memo := range list {
- displayTsList = append(displayTsList, memo.UpdatedTs)
+ displayTsList = append(displayTsList, memo.CreatedTs)
}
}
return c.JSON(http.StatusOK, displayTsList)