[api] turn off statsig

This commit is contained in:
Devin Zuczek
2026-08-31 23:43:13 -04:00
parent 45a07c6ba5
commit 5928e07509
3 changed files with 18 additions and 12 deletions
+5 -3
View File
@@ -119,12 +119,14 @@ export const SuccessErrorEnvelope = z.object({
// ---- Config ----------------------------------------------------------------
/** `GET /api/config/v1/amplitude` — analytics keys (all disabled on this server). */
/** `GET /api/config/v1/amplitude` — the client's analytics keys (blank; RudderStack and StatSig off). */
export const AmplitudeConfig = z.object({
AmplitudeKey: z.string(),
StatSigKey: z.string(),
RudderStackKey: z.string(),
UseRudderStack: z.boolean(),
RudderStackKey: z.string(),
UseStatSig: z.boolean(),
StatSigKey: z.string(),
StatSigEnvironment: z.number().int(),
})
/** `GET /api/config/v1/azurespeech` — speech-to-text config; `Enabled` is false here. */
+8 -6
View File
@@ -29,17 +29,19 @@ export const configRoutes = new Hono<App>({ strict: false })
tags: ['Config'],
summary: 'Analytics keys',
description:
'The Amplitude / StatSig / RudderStack keys the client initialises its analytics ' +
'with. This server collects nothing, so the keys are placeholders and RudderStack ' +
'is off — but the client needs the object to finish loading.',
'The Amplitude / RudderStack / StatSig keys the client initialises its analytics ' +
'with. This server collects nothing, so the keys are blank and RudderStack and ' +
'StatSig are off — but the client needs the object to finish loading.',
responses: { 200: json(AmplitudeConfig, 'Placeholder analytics keys') },
}),
(c) =>
c.json({
AmplitudeKey: 'a',
StatSigKey: 'a',
RudderStackKey: 'a',
AmplitudeKey: '',
UseRudderStack: false,
RudderStackKey: '',
UseStatSig: false,
StatSigKey: '',
StatSigEnvironment: 0,
})
)
.get(
+5 -3
View File
@@ -213,10 +213,12 @@ describe('public endpoints', () => {
const res = await exports.default.fetch(`${ORIGIN}/api/config/v1/amplitude`)
expect(res.status).toBe(200)
expect(await res.json()).toEqual({
AmplitudeKey: 'a',
StatSigKey: 'a',
RudderStackKey: 'a',
AmplitudeKey: '',
UseRudderStack: false,
RudderStackKey: '',
UseStatSig: false,
StatSigKey: '',
StatSigEnvironment: 0,
})
})