mirror of
https://github.com/djdevin/recflare.git
synced 2026-09-08 06:31:27 -07:00
[moderation] stub voice endpoint
This commit is contained in:
+1
-1
@@ -48,7 +48,7 @@ apex/`ns` host and isn't listed within it. Each implemented worker has its own
|
|||||||
| Notifications | `notify` | `notify` | Real-time notifications over SignalR/WebSockets (Durable Object) |
|
| Notifications | `notify` | `notify` | Real-time notifications over SignalR/WebSockets (Durable Object) |
|
||||||
| PlatformNotifications | `platformnotifications` | `platformnotifications` | Stub — deploys and answers, no notification endpoints yet |
|
| PlatformNotifications | `platformnotifications` | `platformnotifications` | Stub — deploys and answers, no notification endpoints yet |
|
||||||
| PlayerSettings | `playersettings` | `playersettings` | Per-player settings (KV) |
|
| PlayerSettings | `playersettings` | `playersettings` | Per-player settings (KV) |
|
||||||
| RoomComments | `roomcomments` | — | Not yet implemented |
|
| RoomComments | `roomcomments` | `roomcomments` | Stub — deploys and answers, no comment endpoints yet |
|
||||||
| RoomieIntegrations | `roomieintegrations` | — | Not yet implemented |
|
| RoomieIntegrations | `roomieintegrations` | — | Not yet implemented |
|
||||||
| Rooms | `rooms` | `rooms` | Room storage & queries; seeds the Dorm & Orientation rooms (D1) |
|
| Rooms | `rooms` | `rooms` | Room storage & queries; seeds the Dorm & Orientation rooms (D1) |
|
||||||
| Storage | `storage` | — | Room uploader |
|
| Storage | `storage` | — | Room uploader |
|
||||||
|
|||||||
@@ -23,4 +23,16 @@ const app = new Hono<App>()
|
|||||||
return c.text('hello, world!')
|
return c.text('hello, world!')
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// Voice-moderation vendor credentials. The client fetches these while setting up voice
|
||||||
|
// so it can talk to the moderation vendor DIRECTLY — the audio never passes through this
|
||||||
|
// service, which is why the credentials are handed out rather than used server-side.
|
||||||
|
//
|
||||||
|
// Both are deliberately EMPTY: no vendor account is wired up here, and the client treats
|
||||||
|
// blank credentials as "voice moderation is off" instead of failing voice setup. The keys
|
||||||
|
// must still be present and strings — a missing key or a null trips the client's parser.
|
||||||
|
// Note `AccountId` is a STRING even though it reads as a number.
|
||||||
|
.get('/voice/config', (c) => {
|
||||||
|
return c.json({ AccountId: '', ApiKey: '' })
|
||||||
|
})
|
||||||
|
|
||||||
export default app
|
export default app
|
||||||
|
|||||||
@@ -6,3 +6,9 @@ it('response with hello world', async () => {
|
|||||||
expect(res.status).toBe(200)
|
expect(res.status).toBe(200)
|
||||||
expect(await res.text()).toMatchInlineSnapshot(`"hello, world!"`)
|
expect(await res.text()).toMatchInlineSnapshot(`"hello, world!"`)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
it('serves empty voice moderation credentials', async () => {
|
||||||
|
const res = await SELF.fetch('https://example.com/voice/config')
|
||||||
|
expect(res.status).toBe(200)
|
||||||
|
expect(await res.json()).toEqual({ AccountId: '', ApiKey: '' })
|
||||||
|
})
|
||||||
|
|||||||
Generated
+31
@@ -987,6 +987,37 @@ importers:
|
|||||||
specifier: 4.105.0
|
specifier: 4.105.0
|
||||||
version: 4.105.0(@cloudflare/workers-types@4.20260630.1)
|
version: 4.105.0(@cloudflare/workers-types@4.20260630.1)
|
||||||
|
|
||||||
|
apps/roomcomments:
|
||||||
|
dependencies:
|
||||||
|
'@repo/hono-helpers':
|
||||||
|
specifier: workspace:*
|
||||||
|
version: link:../../packages/hono-helpers
|
||||||
|
hono:
|
||||||
|
specifier: 4.12.27
|
||||||
|
version: 4.12.27
|
||||||
|
workers-tagged-logger:
|
||||||
|
specifier: 1.0.1
|
||||||
|
version: 1.0.1
|
||||||
|
devDependencies:
|
||||||
|
'@cloudflare/vitest-pool-workers':
|
||||||
|
specifier: 0.16.20
|
||||||
|
version: 0.16.20(@cloudflare/workers-types@4.20260630.1)(@vitest/runner@4.1.9)(@vitest/snapshot@4.1.9)(vitest@4.1.9(@opentelemetry/api@1.9.0)(@types/node@26.0.1)(vite@6.4.3(@types/node@26.0.1)(jiti@2.6.1)(lightningcss@1.29.2)(tsx@4.22.4)(yaml@2.9.0)))
|
||||||
|
'@repo/tools':
|
||||||
|
specifier: workspace:*
|
||||||
|
version: link:../../packages/tools
|
||||||
|
'@repo/typescript-config':
|
||||||
|
specifier: workspace:*
|
||||||
|
version: link:../../packages/typescript-config
|
||||||
|
'@types/node':
|
||||||
|
specifier: 26.0.1
|
||||||
|
version: 26.0.1
|
||||||
|
vitest:
|
||||||
|
specifier: 4.1.9
|
||||||
|
version: 4.1.9(@opentelemetry/api@1.9.0)(@types/node@26.0.1)(vite@6.4.3(@types/node@26.0.1)(jiti@2.6.1)(lightningcss@1.29.2)(tsx@4.22.4)(yaml@2.9.0))
|
||||||
|
wrangler:
|
||||||
|
specifier: 4.105.0
|
||||||
|
version: 4.105.0(@cloudflare/workers-types@4.20260630.1)
|
||||||
|
|
||||||
apps/rooms:
|
apps/rooms:
|
||||||
dependencies:
|
dependencies:
|
||||||
'@repo/domain':
|
'@repo/domain':
|
||||||
|
|||||||
Reference in New Issue
Block a user