Post editor able to edit article

This commit is contained in:
2024-07-30 16:44:04 +08:00
parent 58bb549217
commit fc77c8693f
3 changed files with 40 additions and 2 deletions

View File

@@ -59,12 +59,12 @@ class _PostPublishScreenState extends State<PostPublishScreen> {
Response resp;
if (widget.edit != null) {
resp = await client.put(
'/stories/${widget.edit!.id}',
'/${_editorController.typeEndpoint}/${widget.edit!.id}',
_editorController.payload,
);
} else {
resp = await client.post(
'/stories',
'/${_editorController.typeEndpoint}',
_editorController.payload,
);
}