summaryrefslogtreecommitdiffstats
path: root/src/services
diff options
context:
space:
mode:
authorjdlugosz963 <jdlugosz963@gmail.com>2021-11-09 22:24:46 +0100
committerjdlugosz963 <jdlugosz963@gmail.com>2021-11-09 22:24:46 +0100
commitd1e7d7bf27e25405b6fcdd485e5aa1a3aeb46265 (patch)
tree3e6d73e7c7f28418afbb700e79ce558717f6b29a /src/services
downloadlom_frontend-d1e7d7bf27e25405b6fcdd485e5aa1a3aeb46265.tar.gz
lom_frontend-d1e7d7bf27e25405b6fcdd485e5aa1a3aeb46265.zip
Add login system
Diffstat (limited to 'src/services')
-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