feat(kol): expose kol_profile on /api/auth/me and add seed script

This commit is contained in:
2026-04-17 09:02:33 +08:00
parent 70725193eb
commit 40519545c6
5 changed files with 92 additions and 14 deletions
+4
View File
@@ -26,6 +26,7 @@ import (
"github.com/geo-platform/tenant-api/internal/shared/retrieval"
"github.com/geo-platform/tenant-api/internal/shared/stream"
"github.com/geo-platform/tenant-api/internal/tenant/prompts"
"github.com/geo-platform/tenant-api/internal/tenant/repository"
)
type App struct {
@@ -45,6 +46,7 @@ type App struct {
AuditLogs *auditlog.AsyncWriter
GenerationStreams *stream.GenerationHub
Cache cache.Cache
KolProfiles repository.KolProfileRepository
}
func New(configPath string) (*App, error) {
@@ -96,6 +98,7 @@ func New(configPath string) (*App, error) {
auditLogs := auditlog.NewAsyncWriter(pool, logger)
generationStreams := stream.NewGenerationHub(mqClient)
appCache := cache.New(cfg.Cache.Driver, rdb)
kolProfiles := repository.NewKolProfileRepository(pool)
if cfg.Server.Mode == "release" {
gin.SetMode(gin.ReleaseMode)
@@ -149,6 +152,7 @@ func New(configPath string) (*App, error) {
AuditLogs: auditLogs,
GenerationStreams: generationStreams,
Cache: appCache,
KolProfiles: kolProfiles,
}, nil
}