Closed ccoVeille closed 4 months ago
I'm opening a PR to fix it
Please note the issue can be related to one of my articles that is in draft.
I have draft article that are 2 years old, maybe the way the API replies could lead to that. I didn't look any further.
I can provide replicate steps if needed.
But I don't think validating the JSON is empty would be a problem, only the context, comment, or reason of why it occurs for me may be adapted
Hi @ccoVeille , could you provide the repo steps to create a draft without any content? I have tested on my side, however, I cannot create posts without any content:
Welcome back, I hope you enjoyed your days off.
I think it's an old behavior, my draft articles are 2 years old.
Can you give me the exact API call that your application does ? I'll check with my API key.
I'm on my phone now.
Last time, I failed using VS Code Developer console to see the API calls in network.
The extension calls https://dev.to/api/articles/me/all
to fetch all your posts, and pick the post with the selected id when you click the items in the tree view.
I managed to replicate it easily
Here is what a post look alike
when using the API with https://dev.to/api/articles/me/unpublished, they will have this in common
"body_markdown": "",
I still cannot replicate this issue. Did I miss anything? I cannot find a text field to type the post title, instead, I can only set the title in the meta yaml section of the body part.
You are using the advanced editor
Go in settings then customization
Fixed with #16, closing
I have released v0.0.14 with the fix, please upgrade the extension to verify if this issue has been resolved.
It works !
Your fix is better than mine, as I can now see (maybe edit) the draft documents that have no content
You might have to update this https://marketplace.visualstudio.com/items/sneezry.vscode-devto/changelog
I have a lot of pending articles.
There are ideas I started to work on.
Many have no text or tag yet, only a title.
I cannot use your extension because of that.