-
+
+
{{ user.name }}
diff --git a/client/src/routes.js b/client/src/routes.js
index 8ca8eaa..e19646a 100644
--- a/client/src/routes.js
+++ b/client/src/routes.js
@@ -69,10 +69,10 @@ const router = new VueRouter({
router.beforeEach((to, from, next) => {
if (to.matched.some(record => record.meta.authGuard)) {
- if (Vue.$cookies.get('loggedUser') == null) {
+ if (Vue.$cookies.get('U_') == null) {
next({
path: '/connexion',
- params: { nextUrl: to.fullPath }
+ params: { nextUrl: to.fullPath },
})
} else {
next()
diff --git a/package.json b/package.json
index 0e4bf54..f93fffe 100644
--- a/package.json
+++ b/package.json
@@ -4,7 +4,8 @@
"description": "API for Auracle database",
"main": "index.js",
"scripts": {
- "test": "start"
+ "api": "node index.js",
+ "client": "cd client && npm run serve"
},
"repository": {
"type": "git",