File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -190,15 +190,17 @@ export default class PlayerAPIService extends APIService {
190
190
] , ( a , b ) => a . key === b . key )
191
191
192
192
player1 . setProps ( mergedProps )
193
- player2 . aliases . getItems ( ) . forEach ( ( alias ) => alias . player = player1 )
193
+ player1 . aliases . add ( player2 . aliases )
194
+ player2 . setProps ( [ ] )
194
195
195
196
const saves = await em . getRepository ( GameSave ) . find ( { player : player2 } )
196
197
saves . forEach ( ( save ) => save . player = player1 )
197
198
198
199
const stats = await em . getRepository ( PlayerGameStat ) . find ( { player : player2 } )
199
200
stats . forEach ( ( stat ) => stat . player = player1 )
200
201
201
- await em . removeAndFlush ( player2 )
202
+ await em . flush ( )
203
+ await em . getRepository ( Player ) . nativeDelete ( player2 )
202
204
203
205
return {
204
206
status : 200 ,
You can’t perform that action at this time.
0 commit comments