feat(kol): expose kol_profile on /api/auth/me and add seed script
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user