// ── Player · Rust — the handlers ────────────────────────────────────────── // // See the router for why this tier is thin in phase 1. The one thing it must not // do is reshape the list itself: it calls the same model the public tier does, so // the two answers cannot drift while they are meant to be the same. const core = require('../../core') const servers = require('../../model/servers/servers.model') const log = core.logger('player') async function listServers(req, res) { try { res.json({ servers: await servers.listPublic() }) } catch (err) { log.error('failed to read the server list', { error: err.message }) res.status(500).json({ error: 'Failed to read the server list' }) } } module.exports = { listServers }