diff options
Diffstat (limited to 'src/services/ChatService.js')
| -rw-r--r-- | src/services/ChatService.js | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/services/ChatService.js b/src/services/ChatService.js new file mode 100644 index 0000000..ab1e6c2 --- /dev/null +++ b/src/services/ChatService.js | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | import axios from "axios"; | ||
| 2 | import error_notify from './NotifyErrorService.js' | ||
| 3 | |||
| 4 | const url = 'http://localhost:8000/api/chat/' | ||
| 5 | |||
| 6 | export default { | ||
| 7 | async group_create(data) { | ||
| 8 | return await axios | ||
| 9 | .post(url+'groups/', data) | ||
| 10 | .then(res => { | ||
| 11 | return { | ||
| 12 | status: res.status | ||
| 13 | } | ||
| 14 | }) | ||
| 15 | .catch(error => error_notify(error)) | ||
| 16 | } | ||
| 17 | } | ||
