Files
tm_back/internal/dashboard/form.go
T
Mazyar 68b170126d Refactor AI summarizer client initialization to include MongoDB manager and add statistics endpoint
- Updated `InitAISummarizerClient` to accept `mongoManager` for tracking translation success.
- Introduced new `Statistics` endpoint in the dashboard to fetch scraping and translation statistics.
- Enhanced `TranslationWorker` to utilize the new success counter for tracking successful translations.
- Added necessary data structures and query forms for statistics reporting.

This refactor improves the tracking of AI translation success and provides new insights through the dashboard statistics.
2026-06-06 21:20:53 +03:30

35 lines
873 B
Go

package dashboard
// SummaryQuery binds query params for GET /dashboard/summary.
type SummaryQuery struct {
ClosingWindow int `query:"closing_window"`
}
// TrendQuery binds query params for GET /dashboard/trend.
type TrendQuery struct {
Days int `query:"days"`
Metric string `query:"metric"`
}
// CountriesQuery binds query params for GET /dashboard/countries.
type CountriesQuery struct {
Limit int `query:"limit"`
}
// ClosingSoonQuery binds query params for GET /dashboard/closing-soon.
type ClosingSoonQuery struct {
Limit int `query:"limit"`
Window int `query:"window"`
}
// RecentQuery binds query params for GET /dashboard/recent.
type RecentQuery struct {
Limit int `query:"limit"`
Cursor string `query:"cursor"`
}
// StatisticsQuery binds query params for GET /dashboard/statistics.
type StatisticsQuery struct {
Days int `query:"days"`
}