check json format

This commit is contained in:
Nikolai Petukhov 2024-10-03 22:48:57 +03:00
parent 8d0fadc906
commit 4a5041a65e

View File

@ -21,6 +21,8 @@ export async function post(path, body) {
body: JSON.stringify(body) body: JSON.stringify(body)
}); });
console.log('Data from API:', res);
if (res.status === 200) { if (res.status === 200) {
const data = await res.json(); const data = await res.json();
console.log("Received post:", data); console.log("Received post:", data);