fix build error
All checks were successful
build-and-deploy / build (push) Successful in 23s
build-and-deploy / deploy (push) Successful in 11s

This commit is contained in:
2025-08-28 04:10:19 -06:00
parent 4f4dd2d2f3
commit 6971b41622
2 changed files with 3 additions and 4 deletions

View File

@@ -1014,7 +1014,7 @@ adminRouter.post("/admin/namemanager/import", async (req: Request, res: Response
console.error('[AdminAPI] Error importing nameManager state:', error); console.error('[AdminAPI] Error importing nameManager state:', error);
// Handle specific error types // 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({ return res.status(413).json({
error: 'File too large', error: 'File too large',
details: 'The save file is too large to process. Maximum size: 50MB' 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({ res.status(500).json({
error: 'Failed to import nameManager state', error: 'Failed to import nameManager state',
details: error.message details: error instanceof Error ? error.message : 'Unknown error'
}); });
} }
}); });

View File

@@ -136,8 +136,7 @@ export class GameRoom extends Room<GameState> {
// Update metadata with new status // Update metadata with new status
const statusString = this.state.gameStatus === GameStatus.WAITING ? 'waiting' : const statusString = this.state.gameStatus === GameStatus.WAITING ? 'waiting' :
(this.state.gameStatus === GameStatus.PAUSED ? 'paused' : (this.state.gameStatus === GameStatus.PAUSED ? 'paused' : 'playing');
(this.state.gameStatus === GameStatus.FINISHED ? 'finished' : 'playing'));
this.setMetadata({ this.setMetadata({
gameStatus: statusString, gameStatus: statusString,