diff --git a/frontend/src/api/login.ts b/frontend/src/api/login.ts index 62766e0..bd51e79 100644 --- a/frontend/src/api/login.ts +++ b/frontend/src/api/login.ts @@ -10,7 +10,7 @@ export default { url: 'http://localhost:8000/api/login', headers: { 'Content-Type': 'application/json', - 'X-CSRFToken': cookies.get('csrf-token'), + 'X-CSRFToken': cookies.get('csrftoken'), }, data: { loginName: email, diff --git a/frontend/src/assets/data/diary.json b/frontend/src/assets/data/diary.json index 13b25e7..55f865d 100644 --- a/frontend/src/assets/data/diary.json +++ b/frontend/src/assets/data/diary.json @@ -2,11 +2,11 @@ "diaries": [ { "name": "Vulcan", - "url": "cufs.vulcan.net.pl" + "url": "https://cufs.vulcan.net.pl/" }, { "name": "Fakelog", - "url": "cufs.fakelog.tk" + "url": "http://cufs.fakelog.tk/" } ] } \ No newline at end of file diff --git a/frontend/src/components/Login/UserLogin.vue b/frontend/src/components/Login/UserLogin.vue index 4e7fbc7..f259b7e 100644 --- a/frontend/src/components/Login/UserLogin.vue +++ b/frontend/src/components/Login/UserLogin.vue @@ -69,9 +69,9 @@ export default Vue.extend({ async loginUser() { Vue.set(this.$store.state, 'isLoading', true); const index = diary.diaries.findIndex((item) => item.name === this.selectedDiary); - console.log(index); const response = await login.login(this.login, this.password, - diary.diaries[index].name, diary.diaries[index].url); + 'powiatwulkanowy', diary.diaries[index].url); + console.log(response); this.$store.state.loginData = response.data; console.log(this.$store.state.loginData); @@ -82,7 +82,7 @@ export default Vue.extend({ }, itemSelected() { if (this.selectedDiary === 'Fakelog') { - this.login = 'jan@fakelog.cf'; + this.login = 'jan@fakelog.tk'; this.password = 'jan123'; } },