Migrate to new follows storage

This commit is contained in:
2019-11-19 13:51:54 +09:00
parent 99f5ae1b4f
commit 803d303420
14 changed files with 237 additions and 241 deletions

View File

@ -0,0 +1,22 @@
package main
import (
"github.com/akyoto/color"
"github.com/animenotifier/notify.moe/arn"
)
func main() {
defer arn.Node.Close()
for follows := range arn.StreamUserFollows() {
user, err := arn.GetUser(follows.UserID)
if err != nil {
color.Red(err.Error())
continue
}
user.FollowIDs = follows.Items
user.Save()
}
}