fix build error
This commit is contained in:
@@ -1014,7 +1014,7 @@ adminRouter.post("/admin/namemanager/import", async (req: Request, res: Response
|
||||
console.error('[AdminAPI] Error importing nameManager state:', error);
|
||||
|
||||
// Handle specific error types
|
||||
if (error.message && error.message.includes('PayloadTooLargeError')) {
|
||||
if (error instanceof Error && error.message && error.message.includes('PayloadTooLargeError')) {
|
||||
return res.status(413).json({
|
||||
error: 'File too large',
|
||||
details: 'The save file is too large to process. Maximum size: 50MB'
|
||||
@@ -1023,7 +1023,7 @@ adminRouter.post("/admin/namemanager/import", async (req: Request, res: Response
|
||||
|
||||
res.status(500).json({
|
||||
error: 'Failed to import nameManager state',
|
||||
details: error.message
|
||||
details: error instanceof Error ? error.message : 'Unknown error'
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
@@ -136,8 +136,7 @@ export class GameRoom extends Room<GameState> {
|
||||
|
||||
// Update metadata with new status
|
||||
const statusString = this.state.gameStatus === GameStatus.WAITING ? 'waiting' :
|
||||
(this.state.gameStatus === GameStatus.PAUSED ? 'paused' :
|
||||
(this.state.gameStatus === GameStatus.FINISHED ? 'finished' : 'playing'));
|
||||
(this.state.gameStatus === GameStatus.PAUSED ? 'paused' : 'playing');
|
||||
|
||||
this.setMetadata({
|
||||
gameStatus: statusString,
|
||||
|
||||
Reference in New Issue
Block a user