mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-28 23:34:18 +00:00
create consolex class for remote logging
This commit is contained in:
@@ -45,7 +45,7 @@ app.get('/lobbies', (req, res) => {
|
||||
|
||||
app.post('/private_lobby', (req, res) => {
|
||||
const id = gm.createPrivateGame()
|
||||
console.log('creating private lobby with id ${id}')
|
||||
console.logx('creating private lobby with id ${id}')
|
||||
res.json({
|
||||
id: id
|
||||
});
|
||||
@@ -56,6 +56,7 @@ app.post('/archive_singleplayer_game', (req, res) => {
|
||||
const gameRecord: GameRecord = req.body
|
||||
const clientIP = req.ip || req.socket.remoteAddress || 'unknown'; // Added this line
|
||||
|
||||
|
||||
if (!gameRecord) {
|
||||
console.log('game record not found in request')
|
||||
res.status(404).json({ error: 'Game record not found' });
|
||||
@@ -78,7 +79,7 @@ app.post('/archive_singleplayer_game', (req, res) => {
|
||||
})
|
||||
|
||||
app.post('/start_private_lobby/:id', (req, res) => {
|
||||
console.log(`starting private lobby with id ${req.params.id}`)
|
||||
console.logx(`starting private lobby with id ${req.params.id}`)
|
||||
gm.startPrivateGame(req.params.id)
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user