mirror of
https://github.com/djdevin/recflare.git
synced 2026-09-08 14:41:28 -07:00
update some naming conventions
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* Account storage on the shared `rec-rooms` D1 database. Each account is a single
|
||||
* Account storage on the shared `recflare` D1 database. Each account is a single
|
||||
* JSON blob in the `data` column; queryable fields (AccountId, Username) are
|
||||
* SQLite generated (virtual) columns extracted from that JSON and indexed —
|
||||
* the same JSON-blob pattern the `rooms` worker uses.
|
||||
|
||||
@@ -87,7 +87,7 @@ async function placeNewPlayerInOrientation(env: App['Bindings'], accountId: numb
|
||||
platform: 0,
|
||||
appVersion: '20230302',
|
||||
}
|
||||
await env.MATCH_PRESENCE.put(`presence:${accountId}`, JSON.stringify(presence), {
|
||||
await env.RECFLARE_MATCH_PRESENCE.put(`presence:${accountId}`, JSON.stringify(presence), {
|
||||
expirationTtl: PRESENCE_TTL,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ export type Env = SharedHonoEnv & {
|
||||
// Shared match-presence KV (owned by the `match` worker). On account creation
|
||||
// the new player's presence is seeded to the Orientation room so the match
|
||||
// heartbeat keeps them there instead of bouncing them to the dorm.
|
||||
MATCH_PRESENCE: KVNamespace
|
||||
RECFLARE_MATCH_PRESENCE: KVNamespace
|
||||
}
|
||||
|
||||
/** Variables can be extended */
|
||||
|
||||
@@ -139,7 +139,7 @@ describe('auth worker routes', () => {
|
||||
test('POST /connect/token create_account seeds the new player into Orientation', async () => {
|
||||
const payload = await tokenFor('grant_type=create_account&platform_id=steam-456')
|
||||
const sub = payload.sub as string
|
||||
const presence = await env.MATCH_PRESENCE.get<{
|
||||
const presence = await env.RECFLARE_MATCH_PRESENCE.get<{
|
||||
roomInstance: { roomInstanceId: number; roomId: number; location: string; name: string }
|
||||
}>(`presence:${sub}`, 'json')
|
||||
expect(presence).not.toBeNull()
|
||||
|
||||
Reference in New Issue
Block a user