Fix login error
This commit is contained in:
parent
ebb457f58d
commit
00e81b8b26
3 changed files with 6 additions and 6 deletions
|
@ -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,
|
||||
|
|
|
@ -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/"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -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';
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue