summaryrefslogtreecommitdiffstats
path: root/src/services/AuthService.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/services/AuthService.js')
-rw-r--r--src/services/AuthService.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/services/AuthService.js b/src/services/AuthService.js
new file mode 100644
index 0000000..626a8fb
--- /dev/null
+++ b/src/services/AuthService.js
@@ -0,0 +1,17 @@
1import axios from "axios";
2
3const url = 'http://localhost:8000/api/auth/'
4
5export default {
6 async login(data) {
7 return await axios
8 .post(url+'login/', data)
9 .then(res => res.data)
10 },
11
12 async register(data) {
13 return await axios
14 .post(url+'register/', data)
15 .then(res => res.data)
16 }
17} \ No newline at end of file