Implemented Google login

This commit is contained in:
2017-06-07 21:12:59 +02:00
parent 3cc9ba54c6
commit c222a814e4
4 changed files with 62 additions and 10 deletions

View File

@ -1,6 +1,8 @@
package main
import (
"sort"
"github.com/animenotifier/arn"
"github.com/fatih/color"
)
@ -16,7 +18,9 @@ func main() {
return
}
// sort.Slice
sort.Slice(animeList, func(i, j int) bool {
return animeList[i].StartDate > animeList[j].StartDate
})
// Convert to small anime list
cache := &arn.ListOfIDs{}

View File

@ -10,6 +10,7 @@ func main() {
// Delete Nick:User records
arn.Truncate("NickToUser")
arn.Truncate("EmailToUser")
// Get a stream of all anime
allUsers, err := arn.AllUsers()
@ -24,7 +25,8 @@ func main() {
count++
println(count, user.Nick)
user.ChangeNick(user.Nick)
user.SetNick(user.Nick)
user.SetEmail(user.Email)
}
color.Green("Finished.")