diff --git a/client/src/pages/CreatePost.jsx b/client/src/pages/CreatePost.jsx index f7929d2..efb2968 100644 --- a/client/src/pages/CreatePost.jsx +++ b/client/src/pages/CreatePost.jsx @@ -69,7 +69,7 @@ export default function CreatePost() { body: JSON.stringify(formData), }); const data = await res.json(); - if (!res.ok) { + if (data.success === false) { setPublishError(data.message); return; }