Commit b185d377 authored by Jarod Owen's avatar Jarod Owen
Browse files

Merge branch 'loginProblems' into 'master'

Partial fix for the login issues in production

See merge request !72
parents 964e4389 8c90b242
Pipeline #11341 passed with stages
in 3 minutes and 38 seconds
......@@ -20,7 +20,7 @@
</div>
<button class="btn btn-primary rounded textRow"
@click="login()" type="submit">Submit</button></div><br />
<button v-if="loggedIn() && logIn" class="btn btn-primary rounded textRow"
<button v-if="isLoggedIn" class="btn btn-primary rounded textRow"
@click="logout()" type="submit">Logout</button>
</div>
</template>
......@@ -37,13 +37,16 @@ export default {
pass: '',
adLog: false,
adLogTxt: 'Admin Login',
logIn: false,
userOb: null,
dummy: null
}
},
computed: {
getLoginURL () {
return constants.APIHOST + '/login'
},
isLoggedIn () {
return this.userOb !== null
}
},
......@@ -55,8 +58,9 @@ export default {
})
.then(response => {
console.log(response.data)
this.userOb = response.data.user
this.adLogBtn()
alert('Login success!')
location.reload(true)
})
.catch(error => {
console.log(error)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment