File tree 6 files changed +21
-7
lines changed
src/store/modules/authentication
6 files changed +21
-7
lines changed Original file line number Diff line number Diff line change @@ -19,3 +19,5 @@ yarn-error.log*
19
19
* .njsproj
20
20
* .sln
21
21
* .sw ?
22
+
23
+ .env
Original file line number Diff line number Diff line change
1
+ {
2
+ "routes" : [
3
+ {
4
+ "src" : " /api/(.*)" ,
5
+ "dest" : " https://openrank.herokuapp.com/api/$1"
6
+ }
7
+ ]
8
+ }
Original file line number Diff line number Diff line change @@ -37,14 +37,13 @@ export default {
37
37
email,
38
38
password,
39
39
} ) . then ( ( { data : { data : { token } , message } } ) => {
40
- console . log ( 'TOKEN' , token ) ;
41
40
commit ( 'authentication/user/setToken' , token , { root : true } ) ;
42
41
commit ( 'setSuccessMsg' , message ) ;
42
+ setTimeout ( ( ) => commit ( 'setSuccessMsg' , null ) , 2000 ) ;
43
43
router . push ( '/' ) . catch ( ( ) => { } ) ;
44
44
} ) . catch ( ( { response } ) => {
45
- console . log ( 'CAME HERE' ) ;
46
45
commit ( 'setErrorMsg' , rootGetters . getErrorMessage ( response ) ) ;
47
- console . log ( response ) ;
46
+ setTimeout ( ( ) => commit ( 'setErrorMsg' , null ) , 2000 ) ;
48
47
} ) ;
49
48
} ,
50
49
} ,
Original file line number Diff line number Diff line change @@ -50,9 +50,10 @@ export default {
50
50
password_confirmed,
51
51
} ) . then ( ( { data : { message } } ) => {
52
52
commit ( 'setSuccessMsg' , message ) ;
53
+ setTimeout ( ( ) => commit ( 'setSuccessMsg' , null ) , 2000 ) ;
53
54
} ) . catch ( ( { response } ) => {
54
55
commit ( 'setErrorMsg' , rootGetters . getErrorMessage ( response ) ) ;
55
- console . log ( response ) ;
56
+ setTimeout ( ( ) => commit ( 'setErrorMsg' , null ) , 2000 ) ;
56
57
} ) ;
57
58
} ,
58
59
} ,
Original file line number Diff line number Diff line change @@ -58,9 +58,10 @@ export default {
58
58
commit ( 'setName' , name ) ;
59
59
commit ( 'setEmail' , email ) ;
60
60
commit ( 'setSuccessMsg' , message ) ;
61
+ setTimeout ( ( ) => commit ( 'setSuccessMsg' , null ) , 2000 ) ;
61
62
} ) . catch ( ( { response } ) => {
62
63
commit ( 'setErrorMsg' , rootGetters . getErrorMessage ( response ) ) ;
63
- console . log ( response ) ;
64
+ setTimeout ( ( ) => commit ( 'setErrorMsg' , null ) , 2000 ) ;
64
65
} ) ;
65
66
} ,
66
67
async updateUser ( {
@@ -88,9 +89,10 @@ export default {
88
89
commit ( 'setName' , user . name ) ;
89
90
commit ( 'setEmail' , user . email ) ;
90
91
commit ( 'setSuccessMSg' , message ) ;
92
+ setTimeout ( ( ) => commit ( 'setSuccessMsg' , null ) , 2000 ) ;
91
93
} ) . catch ( ( { response } ) => {
92
94
commit ( 'setErrorMsg' , rootGetters . getErrorMessage ( response ) ) ;
93
- console . log ( response ) ;
95
+ setTimeout ( ( ) => commit ( 'setErrorMsg' , null ) , 2000 ) ;
94
96
} ) ;
95
97
} ,
96
98
} ,
Original file line number Diff line number Diff line change @@ -2,7 +2,9 @@ module.exports = {
2
2
devServer : {
3
3
proxy : {
4
4
'/api' : {
5
- target : 'http://localhost:8000' ,
5
+ target : 'https://localhost:8000' ,
6
+ ws : true ,
7
+ changeOrigin : true ,
6
8
headers : {
7
9
Connection : 'keep-alive' ,
8
10
} ,
You can’t perform that action at this time.
0 commit comments