Fix login error

This commit is contained in:
MRmlik12 2021-06-17 17:03:38 +02:00
parent ebb457f58d
commit 00e81b8b26
3 changed files with 6 additions and 6 deletions

View file

@ -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,

View file

@ -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/"
}
]
}

View file

@ -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';
}
},