docs(design): correct the slug-to-provider-key mapping
Two of three match (eqemu, daoc) but wow does not - Drop names the game, the provider names the emulator (trinitycore). Needs one explicit alias constant, not an assumption that slug == key. Asserted in mmo-portal's tests so a rename breaks a test rather than the mapping.
This commit is contained in:
parent
0572321b5d
commit
1e1f005f76
1 changed files with 19 additions and 2 deletions
|
|
@ -84,8 +84,25 @@ with `slug`, `kind`, `host`, `port`, `protocol`, live `status` /
|
|||
`joinInstructions` and `deepLink`. Slugs are stable and hand-picked
|
||||
(`eqemu`, `wow`, `daoc`) and are already the join key chat uses.
|
||||
|
||||
**That slug is the whole integration.** `GameServer.slug` ↔ mmo-portal
|
||||
`provider.key`. No new identifier, no mapping table.
|
||||
**That slug is very nearly the whole integration.** `GameServer.slug` ↔
|
||||
mmo-portal `provider.key`:
|
||||
|
||||
| Drop `GameServer.slug` | provider `key` | |
|
||||
|---|---|---|
|
||||
| `eqemu` | `eqemu` | matches |
|
||||
| `daoc` | `daoc` | matches |
|
||||
| `wow` | `trinitycore` | **does not match** |
|
||||
|
||||
Two of three agree; WoW does not, because Drop names the *game* and the
|
||||
provider names the *emulator*. So Drop needs one explicit alias map rather
|
||||
than assuming `slug == key` — a three-entry constant, not a table. Do not
|
||||
"fix" this by renaming either side: `GameServer.slug` is already load-bearing
|
||||
for chat's `KNOWN_SERVERS` match (see `community-servers.prisma`), and
|
||||
`provider.key` is the registry lookup used across mmo-portal's routes,
|
||||
templates and its own SQLite link rows.
|
||||
|
||||
Asserted in `mmo-portal/tests/test_internal_api.py` so a rename breaks a test
|
||||
instead of silently breaking the mapping.
|
||||
|
||||
## Coverage
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue