Skip to content

Commit

Permalink
fix: Don't unpublish an article on update
Browse files Browse the repository at this point in the history
  • Loading branch information
stroiman committed Jul 3, 2024
1 parent 33409f2 commit d86cc6d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/medium-gateway.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ export type Article = {

const bodyFromArticle = ({ markdown, ...rest }: Article) => ({
article: {
published: false,
body_markdown: markdown,
...rest,
},
Expand All @@ -22,7 +21,7 @@ export const postArticle = async (
requestUrl: MakeHttpRequest,
) => {
const body = bodyFromArticle(input.article);
console.log("Create dev article", { body });
console.log("Create dev article", { ...body, published: false });
const response = await requestUrl({
url: "https://dev.to/api/articles",
method: "POST",
Expand Down

0 comments on commit d86cc6d

Please sign in to comment.