From a0d1a046d289d37626873121a1fbec8fead68361 Mon Sep 17 00:00:00 2001 From: JdM Date: Mon, 12 Feb 2024 18:00:55 +0100 Subject: [PATCH] added api/new_post.php --- api/new_post.php | 9 +++++++++ front/src/scripts/sendNewPost.ts | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 api/new_post.php diff --git a/api/new_post.php b/api/new_post.php new file mode 100644 index 0000000..51ab2ab --- /dev/null +++ b/api/new_post.php @@ -0,0 +1,9 @@ + \ No newline at end of file diff --git a/front/src/scripts/sendNewPost.ts b/front/src/scripts/sendNewPost.ts index 68b07cf..3b116c8 100644 --- a/front/src/scripts/sendNewPost.ts +++ b/front/src/scripts/sendNewPost.ts @@ -13,7 +13,7 @@ export async function sendNewPost(postContent: string, postImageFile: File|null) } - const response = await fetch(`api/newPost.php`, { + const response = await fetch(`api/new_post.php`, { method: "POST", body: formData, credentials: "include"