mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-16 13:04:34 +00:00
publish posts no matter what
This commit is contained in:
@@ -130,10 +130,11 @@ func (p *Posts) savePost(ctx context.Context, oldPost, post *proto.Post) error {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
if oldPost == nil {
|
|
||||||
// publish the post as an event
|
|
||||||
service.NewEvent("posts").Publish(ctx, post)
|
|
||||||
|
|
||||||
|
// publish the post as an event
|
||||||
|
service.NewEvent("posts").Publish(ctx, post)
|
||||||
|
|
||||||
|
if oldPost == nil {
|
||||||
for _, tagName := range post.Tags {
|
for _, tagName := range post.Tags {
|
||||||
_, err := p.Tags.Add(ctx, &tags.AddRequest{
|
_, err := p.Tags.Add(ctx, &tags.AddRequest{
|
||||||
ResourceID: post.Id,
|
ResourceID: post.Id,
|
||||||
|
|||||||
Reference in New Issue
Block a user