Skip to content

Commit d86cc6d

Browse files
committed
fix: Don't unpublish an article on update
1 parent 33409f2 commit d86cc6d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/medium-gateway.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ export type Article = {
1111

1212
const bodyFromArticle = ({ markdown, ...rest }: Article) => ({
1313
article: {
14-
published: false,
1514
body_markdown: markdown,
1615
...rest,
1716
},
@@ -22,7 +21,7 @@ export const postArticle = async (
2221
requestUrl: MakeHttpRequest,
2322
) => {
2423
const body = bodyFromArticle(input.article);
25-
console.log("Create dev article", { body });
24+
console.log("Create dev article", { ...body, published: false });
2625
const response = await requestUrl({
2726
url: "https://dev.to/api/articles",
2827
method: "POST",

0 commit comments

Comments
 (0)