mirror of
https://github.com/djdevin/recflare.git
synced 2026-09-09 07:01:27 -07:00
[api] player photo tagging setting
GET/PUT /api/players/v1/playerPhotoTaggingSetting, ported from the reference's PlayerDB.Get/SetPlayerPhotoTaggingSetting. Backed by the shared player-settings KV bag (owned by the `playersettings` worker) under a `PlayerPhotoTaggingSetting` key rather than its own table. The setting is served as the enum ORDINAL (0 Anyone / 1 Friends / 2 NoOne) — the reference registers no JsonStringEnumConverter, so the client decodes a number. Unset reads back 0; the PUT answers a bare true, or false when the body carries no recognizable setting, as the reference's bool does. The write merges into the player's settings map and seeds the `playersettings` defaults when there is none yet, so writing this key can't cost a player the seeding that worker's first read would have done. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -12,6 +12,7 @@ import { gameplayRoutes } from './routes/gameplay'
|
||||
import { imageRoutes } from './routes/images'
|
||||
import { inventoryRoutes } from './routes/inventory'
|
||||
import { moderationRoutes } from './routes/moderation'
|
||||
import { playerRoutes } from './routes/players'
|
||||
import { progressionRoutes } from './routes/progression'
|
||||
import { roomRoutes } from './routes/rooms'
|
||||
import { socialRoutes } from './routes/social'
|
||||
@@ -64,6 +65,7 @@ const app = new Hono<App>({ strict: false })
|
||||
.route('/', roomRoutes)
|
||||
.route('/', imageRoutes)
|
||||
.route('/', accountRoutes)
|
||||
.route('/', playerRoutes)
|
||||
|
||||
// The generated spec. Documentation only — no request is validated against it (see
|
||||
// openapi.ts). `hide: true` keeps this route out of its own output.
|
||||
|
||||
Reference in New Issue
Block a user