// ── Player · Rust ───────────────────────────────────────────────────────── // // Mounted at `/api/v1/player/rust`. The tier's gate is already applied: `player` // sits behind `noindex, requireAuth`, so every handler here has a signed-in user // and none of them re-implements that check. // // ── Why this tier exists in phase 1, and what it honestly holds ─────────── // // R14 puts this module on all three tiers from the start, and the loader holds // `module.json`'s `mounts` against what is actually registered in **both** // directions — a declared prefix that never gets a router fails the load. So the // declaration and the registration land together or not at all. // // What this tier will carry is the signed-in view of a server: the viewer's own // linked Steam identity, their own presence, their own entitlements. None of that // exists yet — identity is a later phase — so the one route here answers the // server list as the signed-in caller sees it, which is currently the same list // the public tier serves. // // That is deliberately a real route and not a placeholder: it is the URL the app // and the SPA will call, and it starts answering correctly now rather than // changing address later. What it must not become is a second copy of the public // shape — it delegates to the same model, so the two cannot drift. const core = require('../../core') const express = core.express const servers = require('./rust.controller') const playerRustRouter = express.Router() playerRustRouter.get( '/servers', // #swagger.tags = ['Player · Rust'] // #swagger.summary = 'The Rust servers, for a signed-in player' // #swagger.description = 'The same servers the public list carries, answered on the authenticated tier. It is the address a signed-in client calls, so that per-player detail can be added here without moving it. Requires a session.' /* #swagger.responses[200] = { description: 'The server list', content: { "application/json": { schema: { $ref: "#/components/schemas/RustServerList" } } } } */ servers.listServers, ) module.exports = playerRustRouter