Updated post deletion

This commit is contained in:
Eduard Urbach 2022-06-29 12:00:41 +09:00
parent 5c862211c7
commit 9ec3127da5
Signed by: akyoto
GPG Key ID: C874F672B1AF20C0

View File

@ -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)
}
}
}