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);
|
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'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -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,
|
||||||
|
|||||||
Reference in New Issue
Block a user