Skip to content
This repository was archived by the owner on Dec 14, 2023. It is now read-only.

Commit 78c723b

Browse files
committed
adjust for rpi auth routes becoming standard auth routes
1 parent 6a127bf commit 78c723b

File tree

6 files changed

+7
-22
lines changed

6 files changed

+7
-22
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"karma": "cross-env BABEL_ENV=test karma start test/unit/karma.conf.js",
1212
"test": "yarn unit && yarn cypress",
1313
"lint": "eslint --ext .js,.vue src test/unit/specs",
14-
"cypress": "yarn build && concurrently --kill-others --success first \"node cypress-spa-server.js > /dev/null\" \"cypress open --browser chrome\"",
14+
"cypress": "yarn build && concurrently --kill-others --success first \"node cypress-spa-server.js > /dev/null\" \"cypress run --browser chrome\"",
1515
"cypress:open": "cypress open",
1616
"cypress:install": "cypress install"
1717
},

src/common/cd-header.vue

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,11 +133,10 @@ import '@coderdojo/cd-common/dist/cd-common.min';
133133
export default {
134134
name: 'cd-header',
135135
data() {
136-
const rpiAuthFlag = window.localStorage.getItem('rpiAuth') === 'true';
137136
return {
138-
loginPath: rpiAuthFlag ? '/rpi/login' : '/login',
139-
logoutPath: rpiAuthFlag ? '/rpi/logout' : '/logout',
140-
registerPath: rpiAuthFlag ? '/rpi/register' : '/register/user',
137+
loginPath: '/login',
138+
logoutPath: '/logout',
139+
registerPath: '/register',
141140
navigationLinks: [
142141
{
143142
href: 'https://coderdojo.com/about/',

src/events/cd-event-list.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@
116116
/* eslint-enable no-alert */
117117
this.loadUserDojoRole();
118118
} else {
119-
location.href = `/register/account?referer=${this.$route.path}`;
119+
location.href = `/register?referer=${this.$route.path}`;
120120
}
121121
},
122122
},

src/router/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ const router = new Router({
111111
component: AccountType,
112112
},
113113
{
114-
path: '/home',
114+
path: '/home',
115115
name: 'Home',
116116
component: Home,
117117
beforeEnter: loggedInNavGuard,

src/router/loggedInCDFNavGuard.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ const fn = {
55
if (user && user.login) {
66
return next();
77
}
8-
const rpiAuthFlag = window.localStorage.getItem('rpiAuth') === 'true';
9-
return window.location.replace(`/${rpiAuthFlag ? 'rpi' : 'cdf'}/login?referer=${from}`);
8+
return window.location.replace(`/login?referer=${from}`);
109
},
1110
};
1211
export default async function (to, from, next) {

src/router/profileAuthRedirect.js

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)