File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed
flask-motd/static/admin/core/js Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -114,9 +114,7 @@ var PLUGIN = function () {
114114 } , function ( data ) {
115115 clearPlayers ( ) ;
116116 data [ 'players' ] . forEach ( function ( val , i , arr ) {
117- var playerEntry = new PlayerEntry ( val . id , val . name ) ;
118- playerEntry . create ( tableNode ) ;
119- playerEntries . push ( playerEntry ) ;
117+ addPlayer ( val [ 'id' ] , val [ 'name' ] ) ;
120118 } ) ;
121119 } , function ( err ) {
122120 // TODO: Display error
@@ -141,9 +139,7 @@ var PLUGIN = function () {
141139 if ( data [ 'status' ] == "ok" ) ; // TODO: Display success popup
142140 clearPlayers ( ) ;
143141 data [ 'players' ] . forEach ( function ( val , i , arr ) {
144- var playerEntry = new PlayerEntry ( id , name ) ;
145- playerEntry . create ( tableNode ) ;
146- playerEntries . push ( playerEntry ) ;
142+ addPlayer ( val [ 'id' ] , val [ 'name' ] ) ;
147143 } ) ;
148144 } , function ( err ) {
149145 // TODO: Display error
You can’t perform that action at this time.
0 commit comments