Added frontpage and Google login

This commit is contained in:
2017-06-15 23:03:55 +02:00
parent 938057a626
commit 2d8d8299ef
12 changed files with 99 additions and 33 deletions

View File

@ -10,6 +10,7 @@ func main() {
arn.DB.DeleteTable("NickToUser")
arn.DB.DeleteTable("EmailToUser")
arn.DB.DeleteTable("GoogleToUser")
// Get a stream of all anime
allUsers, err := arn.AllUsers()
@ -29,6 +30,13 @@ func main() {
if user.Email != "" {
user.SetEmail(user.Email)
}
if user.Accounts.Google.ID != "" {
arn.DB.Set("GoogleToUser", user.Accounts.Google.ID, &arn.GoogleToUser{
ID: user.Accounts.Google.ID,
UserID: user.ID,
})
}
}
color.Green("Finished.")