mirror of
https://github.com/djdevin/recflare.git
synced 2026-09-08 14:41:28 -07:00
remove hard coded routes
This commit is contained in:
@@ -174,7 +174,11 @@ const app = new Hono<App>({ strict: false })
|
||||
VersionRegex: '.*',
|
||||
})
|
||||
)
|
||||
.get('/api/config/v2', (c) => c.json(apiConfigV2))
|
||||
// ShareBaseUrl is derived from the deploy-time base domain; the rest of the
|
||||
// config is static.
|
||||
.get('/api/config/v2', (c) =>
|
||||
c.json({ ...apiConfigV2, ShareBaseUrl: `https://www.${c.env.DOMAIN}/{0}` })
|
||||
)
|
||||
.get('/api/versioncheck/v4', (c) =>
|
||||
c.json({
|
||||
VersionStatus: 0,
|
||||
|
||||
@@ -2,6 +2,12 @@ import type { HonoApp } from '@repo/hono-helpers'
|
||||
import type { SharedHonoEnv, SharedHonoVariables } from '@repo/hono-helpers/src/types'
|
||||
|
||||
export type Env = SharedHonoEnv & {
|
||||
/**
|
||||
* Base domain the share-link URL is derived from, e.g. `rec.example.com`.
|
||||
* Injected at deploy time via `--var DOMAIN`; defaults in `wrangler.jsonc`
|
||||
* for local dev and tests.
|
||||
*/
|
||||
DOMAIN: string
|
||||
// Shared rooms database (schema/migrations owned by the `rooms` worker). Used
|
||||
// read-only here for the /roomserver/rooms/* endpoints.
|
||||
DB: D1Database
|
||||
|
||||
Reference in New Issue
Block a user