Skip to content

Commit 940f920

Browse files
author
gondzo
committed
Merge branch 'dev'
2 parents 6b291bc + 7dbee71 commit 940f920

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/store/modules/global.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,14 @@ export const sendLoginRequest = (values) => new Promise((resolve) => {
1515
userApi.login(values.email, values.password).then((authResult) => {
1616
isLogged = true;
1717
hasError = false;
18-
browserHistory.push('/browse-provider');
18+
if (authResult.user.role=='consumer')
19+
browserHistory.push('/browse-provider');
20+
else if (authResult.user.role=='provider')
21+
browserHistory.push('/dashboard');
22+
else if (authResult.user.role=='admin')
23+
browserHistory.push('/admin');
24+
else if (authResult.user.role=='pilot')
25+
browserHistory.push('/pilot');
1926
}).catch((err) => {
2027
isLogged = false;
2128
hasError = true;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy