Minor changes
This commit is contained in:
parent
5adc2def74
commit
e70dc0daed
@ -13,7 +13,7 @@ component AniListMissingMapping(missing []*arn.Anime)
|
||||
th Tools
|
||||
tbody
|
||||
each anime in missing
|
||||
tr
|
||||
tr.mountable
|
||||
td= anime.Popularity.Total()
|
||||
td
|
||||
a(href=anime.Link(), target="_blank", rel="noopener")= anime.Title.Canonical
|
||||
|
@ -13,7 +13,7 @@ component ShoboiMissingMapping(missing []*arn.Anime)
|
||||
th Tools
|
||||
tbody
|
||||
each anime in missing
|
||||
tr
|
||||
tr.mountable
|
||||
td= anime.Popularity.Total()
|
||||
td
|
||||
a(href=anime.Link(), target="_blank", rel="noopener")= anime.Title.Canonical
|
||||
|
@ -1,39 +0,0 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/animenotifier/arn"
|
||||
"github.com/fatih/color"
|
||||
)
|
||||
|
||||
func main() {
|
||||
color.Yellow("Adding empty anime lists to users who don't have one")
|
||||
|
||||
// Get a stream of all users
|
||||
allUsers, err := arn.StreamUsers()
|
||||
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
// Iterate over the stream
|
||||
for user := range allUsers {
|
||||
exists, err := arn.DB.Exists("AnimeList", user.ID)
|
||||
|
||||
if err == nil && !exists {
|
||||
fmt.Println(user.Nick)
|
||||
|
||||
err := arn.DB.Set("AnimeList", user.ID, &arn.AnimeList{
|
||||
UserID: user.ID,
|
||||
Items: make([]*arn.AnimeListItem, 0),
|
||||
})
|
||||
|
||||
if err != nil {
|
||||
color.Red(err.Error())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
color.Green("Finished.")
|
||||
}
|
Loading…
Reference in New Issue
Block a user