fix(speak): explicit imports for voice-quota helpers

Nitro auto-import doesn't reliably pick up named exports from
db/voiceQuota.ts at runtime — speak endpoint threw 500 with
"ReferenceError: getRemainingVoiceQuota is not defined".

Explicit imports for getRemainingVoiceQuota, consumeVoiceQuota,
estimateAudioSeconds + getPlanLimits.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
chahinebrini 2026-05-09 18:11:42 +02:00
parent 30ed4191b6
commit e5c9fadd1d

View File

@ -1,5 +1,11 @@
import type { H3Event } from "h3";
import type { VoiceConfig } from "../../utils/plan-features";
import { getPlanLimits } from "../../utils/plan-features";
import {
getRemainingVoiceQuota,
consumeVoiceQuota,
estimateAudioSeconds,
} from "../../db/voiceQuota";
/**
* POST /api/coach/speak