1
0
mirror of https://github.com/mgerb/top-of-reddit synced 2026-01-11 02:52:53 +00:00

fixed top post indexing - commit message date

This commit is contained in:
2017-03-01 08:06:41 -06:00
parent 0df6ccca89
commit c9f06298bc

View File

@@ -260,7 +260,7 @@ func updateDailyPosts(db *bolt.DB, bucket []byte, day []byte, redditPosts []Redd
}
// only store the highest position a post achieves
if storedPost.TopPosition > index+1 {
if storedPost.TopPosition < index+1 {
post.TopPosition = storedPost.TopPosition
}
} else {
@@ -333,7 +333,7 @@ func getPosts(subreddit string) (string, error) {
func pushToGithub() error {
fmt.Println("Pushing to Github...")
commitMessage := "Adding posts for " + string(getTodayBucket())
commitMessage := "Adding posts for " + string(getYesterdayBucket())
out, err := exec.Command("git", "add", ".").Output()
if err != nil {