mirror of
https://github.com/djdevin/recflare.git
synced 2026-09-09 23:21:30 -07:00
[api] turn off statsig
This commit is contained in:
@@ -119,12 +119,14 @@ export const SuccessErrorEnvelope = z.object({
|
|||||||
|
|
||||||
// ---- Config ----------------------------------------------------------------
|
// ---- 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({
|
export const AmplitudeConfig = z.object({
|
||||||
AmplitudeKey: z.string(),
|
AmplitudeKey: z.string(),
|
||||||
StatSigKey: z.string(),
|
|
||||||
RudderStackKey: z.string(),
|
|
||||||
UseRudderStack: z.boolean(),
|
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. */
|
/** `GET /api/config/v1/azurespeech` — speech-to-text config; `Enabled` is false here. */
|
||||||
|
|||||||
@@ -29,17 +29,19 @@ export const configRoutes = new Hono<App>({ strict: false })
|
|||||||
tags: ['Config'],
|
tags: ['Config'],
|
||||||
summary: 'Analytics keys',
|
summary: 'Analytics keys',
|
||||||
description:
|
description:
|
||||||
'The Amplitude / StatSig / RudderStack keys the client initialises its analytics ' +
|
'The Amplitude / RudderStack / StatSig keys the client initialises its analytics ' +
|
||||||
'with. This server collects nothing, so the keys are placeholders and RudderStack ' +
|
'with. This server collects nothing, so the keys are blank and RudderStack and ' +
|
||||||
'is off — but the client needs the object to finish loading.',
|
'StatSig are off — but the client needs the object to finish loading.',
|
||||||
responses: { 200: json(AmplitudeConfig, 'Placeholder analytics keys') },
|
responses: { 200: json(AmplitudeConfig, 'Placeholder analytics keys') },
|
||||||
}),
|
}),
|
||||||
(c) =>
|
(c) =>
|
||||||
c.json({
|
c.json({
|
||||||
AmplitudeKey: 'a',
|
AmplitudeKey: '',
|
||||||
StatSigKey: 'a',
|
|
||||||
RudderStackKey: 'a',
|
|
||||||
UseRudderStack: false,
|
UseRudderStack: false,
|
||||||
|
RudderStackKey: '',
|
||||||
|
UseStatSig: false,
|
||||||
|
StatSigKey: '',
|
||||||
|
StatSigEnvironment: 0,
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
.get(
|
.get(
|
||||||
|
|||||||
@@ -213,10 +213,12 @@ describe('public endpoints', () => {
|
|||||||
const res = await exports.default.fetch(`${ORIGIN}/api/config/v1/amplitude`)
|
const res = await exports.default.fetch(`${ORIGIN}/api/config/v1/amplitude`)
|
||||||
expect(res.status).toBe(200)
|
expect(res.status).toBe(200)
|
||||||
expect(await res.json()).toEqual({
|
expect(await res.json()).toEqual({
|
||||||
AmplitudeKey: 'a',
|
AmplitudeKey: '',
|
||||||
StatSigKey: 'a',
|
|
||||||
RudderStackKey: 'a',
|
|
||||||
UseRudderStack: false,
|
UseRudderStack: false,
|
||||||
|
RudderStackKey: '',
|
||||||
|
UseStatSig: false,
|
||||||
|
StatSigKey: '',
|
||||||
|
StatSigEnvironment: 0,
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user