mirror of
https://github.com/hanzoai/chat.git
synced 2026-09-30 20:51:17 +00:00
Backend: GET /api/usage (requireJwtAuth) aggregates this user's prompt+ completion Transaction spend over today/7d/30d plus a per-model breakdown, enriched with the org tier from CommerceClient. Response mirrors the @hanzo/usage UsageSnapshot shape (providerId 'hanzo', totals, providerCost) for one wire format across Hanzo products. Frontend: new Usage settings tab beside Balance, reusing the UsageBar idiom; useGetUserUsage hook follows useGetUserBalance; en localization strings added.
9 lines
247 B
JavaScript
9 lines
247 B
JavaScript
const express = require('express');
|
|
const router = express.Router();
|
|
const controller = require('../controllers/Usage');
|
|
const { requireJwtAuth } = require('../middleware/');
|
|
|
|
router.get('/', requireJwtAuth, controller);
|
|
|
|
module.exports = router;
|