File tree Expand file tree Collapse file tree 1 file changed +0
-29
lines changed Expand file tree Collapse file tree 1 file changed +0
-29
lines changed Original file line number Diff line number Diff line change @@ -42,10 +42,6 @@ export default {
4242 this . loadDataForAuthenticatedUser ( ) ;
4343 }
4444
45- if ( Spark . userId && Spark . usesApi ) {
46- this . refreshApiTokenEveryFewMinutes ( ) ;
47- }
48-
4945 Bus . $on ( 'updateUser' , function ( ) {
5046 self . getUser ( ) ;
5147 } ) ;
@@ -102,31 +98,6 @@ export default {
10298 this . getNotifications ( ) ;
10399 } ,
104100
105-
106- /**
107- * Refresh the current API token every few minutes.
108- */
109- refreshApiTokenEveryFewMinutes ( ) {
110- this . lastRefreshedApiTokenAt = moment ( ) ;
111-
112- window . sparkTokenRefreshInterval = setInterval ( ( ) => {
113- if ( moment ( ) . diff ( this . lastRefreshedApiTokenAt , 'minutes' ) >= 4 ) {
114- this . refreshApiToken ( ) ;
115- }
116- } , 15000 ) ;
117- } ,
118-
119-
120- /**
121- * Refresh the current API token.
122- */
123- refreshApiToken ( ) {
124- this . lastRefreshedApiTokenAt = moment ( ) ;
125-
126- axios . put ( '/spark/token' ) ;
127- } ,
128-
129-
130101 /*
131102 * Get the current user of the application.
132103 */
You can’t perform that action at this time.
0 commit comments