1
0
mirror of https://github.com/schollz/cowyo.git synced 2023-08-10 21:13:00 +03:00

Update GetMajorSnapshots API

Former-commit-id: eafad64cf835e69fa4994dd2173287eb68a49975 [formerly 7c91b825f33c0deea8a4b26419c3395fe1d9ff69] [formerly 4fdb4a30274e2028f13bf89b37b678a208118b58 [formerly 3a29cc5adf]]
Former-commit-id: f131365c5c22dc159510a1c837dd26e8c8b9e06f [formerly 10b24d4adb33a566fb1e1e76d19d5af677d7ad38]
Former-commit-id: 1b0096a9d5b26ea2f6492394e7b7cbee944e1fa1
This commit is contained in:
Zack Scholl 2017-03-23 07:22:14 -06:00
parent 3886f3d00e
commit 3781c6457e

View File

@ -97,7 +97,7 @@ func handlePageRequest(c *gin.Context) {
rawHTML = GithubMarkdownToHTML(rawText) rawHTML = GithubMarkdownToHTML(rawText)
} }
} }
versionsInt64 := p.Text.GetMajorSnapshots() versionsInt64 := p.Text.GetMajorSnapshots(60) // get snapshots 60 seconds apart
versionsText := make([]string, len(versionsInt64)) versionsText := make([]string, len(versionsInt64))
for i, v := range versionsInt64 { for i, v := range versionsInt64 {
versionsText[i] = time.Unix(v/1000000000, 0).String() versionsText[i] = time.Unix(v/1000000000, 0).String()