From fd8d5d5a7449f7748806d8ad7067d4becd93522e Mon Sep 17 00:00:00 2001 From: hwinkr Date: Sat, 23 Dec 2023 22:47:06 +0900 Subject: [PATCH] =?UTF-8?q?feat(post=20suggestion=20function):=20=EA=B1=B4?= =?UTF-8?q?=EC=9D=98=EC=82=AC=ED=95=AD=EC=9D=84=20=EB=B3=B4=EB=82=B4?= =?UTF-8?q?=EB=8A=94=20api=20=ED=95=A8=EC=88=98=20=EB=B6=84=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apis/suggestion/post-suggestion.ts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 src/apis/suggestion/post-suggestion.ts diff --git a/src/apis/suggestion/post-suggestion.ts b/src/apis/suggestion/post-suggestion.ts new file mode 100644 index 00000000..7905f71a --- /dev/null +++ b/src/apis/suggestion/post-suggestion.ts @@ -0,0 +1,18 @@ +import http from '@apis/http'; +import { SERVER_URL } from '@config/index'; + +const postSuggestion = async (value: string | undefined) => { + await http.post( + `${SERVER_URL}/api/suggestion`, + { + content: value, + }, + { + headers: { + 'Content-Type': 'application/json', + }, + }, + ); +}; + +export default postSuggestion;