Use HasCreator and HasEditor mixins
This commit is contained in:
17
patches/add-forum-creators/add-forum-creators.go
Normal file
17
patches/add-forum-creators/add-forum-creators.go
Normal file
@ -0,0 +1,17 @@
|
||||
package main
|
||||
|
||||
import "github.com/animenotifier/arn"
|
||||
|
||||
func main() {
|
||||
defer arn.Node.Close()
|
||||
|
||||
for post := range arn.StreamPosts() {
|
||||
post.CreatedBy = post.AuthorID
|
||||
post.Save()
|
||||
}
|
||||
|
||||
for thread := range arn.StreamThreads() {
|
||||
thread.CreatedBy = thread.AuthorID
|
||||
thread.Save()
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user