fix(api): cached acuc didn't have the is_extract flag set

cosmetic issue only (error message), no behavioural change
This commit is contained in:
Gergő Móricz 2025-06-25 14:46:26 +02:00
parent bc9065810d
commit b51692db1c

View File

@ -211,12 +211,16 @@ export async function getACUC(
const chunk: AuthCreditUsageChunk | null = const chunk: AuthCreditUsageChunk | null =
data.length === 0 ? null : data[0].team_id === null ? null : data[0]; data.length === 0 ? null : data[0].team_id === null ? null : data[0];
if (chunk) {
chunk.is_extract = isExtract;
}
// NOTE: Should we cache null chunks? - mogery // NOTE: Should we cache null chunks? - mogery
if (chunk !== null && useCache) { if (chunk !== null && useCache) {
setCachedACUC(api_key, isExtract, chunk); setCachedACUC(api_key, isExtract, chunk);
} }
return chunk ? { ...chunk, is_extract: isExtract } : null; return chunk;
} else { } else {
return null; return null;
} }