Updated post deletion
This commit is contained in:
parent
5c862211c7
commit
9ec3127da5
@ -18,7 +18,15 @@ func main() {
|
||||
if obj == nil {
|
||||
color.Yellow(post.ID)
|
||||
color.Red(post.Text)
|
||||
post.Delete()
|
||||
|
||||
// Remove activities
|
||||
for activity := range arn.StreamActivityCreates() {
|
||||
if activity.ObjectID == post.ID && activity.ObjectType == "Post" {
|
||||
activity.Delete()
|
||||
}
|
||||
}
|
||||
|
||||
arn.DB.Delete("Post", post.ID)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user