Fix GLM API field: type instead of quota_type

This commit is contained in:
ren
2026-02-16 19:44:01 -03:00
parent 0c0b89ee03
commit 86b1095f29

4
dist/index.js vendored
View File

@@ -84,8 +84,8 @@ async function getGlmUsage() {
let totalMinutes = 0; let totalMinutes = 0;
for (const l of limits) { for (const l of limits) {
if (l.quota_type === 'TOKENS_LIMIT') tokenPct = l.percentage || 0; if (l.type === 'TOKENS_LIMIT') tokenPct = l.percentage || 0;
if (l.quota_type === 'TIME_LIMIT') { if (l.type === 'TIME_LIMIT') {
timeRemaining = (l.remaining || 0) / 1000 / 60; timeRemaining = (l.remaining || 0) / 1000 / 60;
totalMinutes = (l.total || 0) / 1000 / 60; totalMinutes = (l.total || 0) / 1000 / 60;
} }