diff --git a/src/api/chat.js b/src/api/chat.js index b6a3cfe..71fffc1 100644 --- a/src/api/chat.js +++ b/src/api/chat.js @@ -1,20 +1,5 @@ -import globalContext from '../context'; import http from './index'; -export const createChatAPI = (data) => new Promise((resolve, reject) => { - fetch(`${globalContext.backendUrl}/chat/`, { - method: 'POST', - headers: { - 'Content-Type': 'application/json', - }, - body: JSON.stringify(data), - credentials: 'include', - }).then( - (res) => resolve(res), - (err) => reject(err), - ); -}); - export const preCheckAPI = (data) => new Promise((resolve, reject) => { http.post('/chat/pre_check/', data).then( (res) => resolve(res), diff --git a/src/components/ChatInput.vue b/src/components/ChatInput.vue index e0d8b54..c62fdd7 100644 --- a/src/components/ChatInput.vue +++ b/src/components/ChatInput.vue @@ -1,10 +1,11 @@