Skip to content

Commit

Permalink
Merge pull request #167 from HE-Arc/166-frontend-logout-doesnt-work-a…
Browse files Browse the repository at this point in the history
…nd-display-404

166 frontend logout doesnt work and display 404
  • Loading branch information
Strogator authored Apr 24, 2024
2 parents db7e77c + c09a544 commit 3678140
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 9 deletions.
6 changes: 1 addition & 5 deletions frontend/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,7 @@
</head>

<body>
<div id="app" style="min-height: 100vh;
display: flex;
flex-direction: column;
justify-content: space-between;" >
</div>
<div id="app"></div>
<script type="module" src="/src/main.js"></script>
</body>

Expand Down
3 changes: 0 additions & 3 deletions frontend/src/api_client.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,9 +222,6 @@ export default
* @returns {Object} The response data from the API
*/
static async logoutUser() {
// TODO maelys: uncomment this line when the backend is ready
//const response = await axios.post('/api/user/logout/');

// remove cookie
document.cookie = `access_token=; expires=Thu, 01 Jan 1970 00:00:00 UTC; secure`;

Expand Down
7 changes: 7 additions & 0 deletions frontend/src/assets/main.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
@import './base.css';

#app {
min-height: 100vh;
display: flex;
flex-direction: column;
justify-content: space-between;
}

a {
text-decoration: none;
color: var(--miq-blue);
Expand Down
5 changes: 5 additions & 0 deletions frontend/src/router/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ const router = createRouter({
name: 'Login',
component: () => import('../views/Authentication/LoginView.vue')
},
{
path: '/logout',
name: 'Logout',
component: () => import('../views/Authentication/LogoutView.vue')
},
{
path: '/register',
name: 'Register',
Expand Down
1 change: 0 additions & 1 deletion frontend/src/views/Authentication/LoginView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ const login = async () => {
display: flex;
flex-direction: column;
align-items: center;
min-height: 80vh;
}
.title, .info {
Expand Down

0 comments on commit 3678140

Please sign in to comment.