summaryrefslogtreecommitdiff
path: root/src/http/posts.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/http/posts.go')
-rw-r--r--src/http/posts.go13
1 files changed, 3 insertions, 10 deletions
diff --git a/src/http/posts.go b/src/http/posts.go
index 5c7ac25..b1dbc35 100644
--- a/src/http/posts.go
+++ b/src/http/posts.go
@@ -418,7 +418,7 @@ func postFromPostReq(r *http.Request) (post.Post, error) {
return p, nil
}
-func (a *api) storeAndPublishPost(ctx context.Context, p post.Post) error {
+func (a *api) publishPost(ctx context.Context, p post.Post) error {
first, err := a.params.PostStore.Set(p, time.Now())
@@ -430,13 +430,6 @@ func (a *api) storeAndPublishPost(ctx context.Context, p post.Post) error {
return nil
}
- a.params.Logger.Info(ctx, "publishing blog post to mailing list")
- urlStr := a.postURL(p.ID, true)
-
- if err := a.params.MailingList.Publish(p.Title, urlStr); err != nil {
- return fmt.Errorf("publishing post to mailing list: %w", err)
- }
-
if err := a.params.PostDraftStore.Delete(p.ID); err != nil {
return fmt.Errorf("deleting draft: %w", err)
}
@@ -458,9 +451,9 @@ func (a *api) postPostHandler() http.Handler {
ctx = mctx.Annotate(ctx, "postID", p.ID)
- if err := a.storeAndPublishPost(ctx, p); err != nil {
+ if err := a.publishPost(ctx, p); err != nil {
apiutil.InternalServerError(
- rw, r, fmt.Errorf("storing/publishing post with id %q: %w", p.ID, err),
+ rw, r, fmt.Errorf("publishing post with id %q: %w", p.ID, err),
)
return
}