Skip to content

Commit

Permalink
blog: fix new blog posts
Browse files Browse the repository at this point in the history
  • Loading branch information
thiagokokada authored Jul 28, 2024
1 parent 51b2061 commit 1cef327
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions blog.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,17 +250,17 @@ func publishToMataroa(posts []post) {
for _, post := range posts {
p, resp := mustGetMataroaPost(post)
if p.Ok {
p, resp := mustPatchMataroaPost(post)
p, resp = mustPatchMataroaPost(post)
fmt.Printf("[UPDATED] (code=%d): %+v\n", resp.StatusCode, p)
} else if resp.StatusCode == 404 {
p, resp := mustPostMataroaPost(post)
p, resp = mustPostMataroaPost(post)
fmt.Printf("[NEW] (code=%d): %+v\n", resp.StatusCode, p)
} else {
fmt.Printf("[ERROR] %s: %+v\n", post.slug, resp)
}

if resp.StatusCode != 200 {
panic(fmt.Sprintf("non-200 response: %s", post.slug))
panic(fmt.Sprintf("non-200 response for post: %s", post.slug))
}
}
}
Expand Down

0 comments on commit 1cef327

Please sign in to comment.