From 1d65833b8a14c7de044bcf82aaed15d3a2303ee6 Mon Sep 17 00:00:00 2001 From: Iron_Felix Date: Mon, 24 Nov 2025 06:56:42 +0300 Subject: [PATCH] fix --- modules/backend/handlers/common.go | 5 ++++- modules/backend/handlers/titles.go | 3 ++- modules/backend/handlers/users.go | 3 ++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/modules/backend/handlers/common.go b/modules/backend/handlers/common.go index e22ce3f..e233f98 100644 --- a/modules/backend/handlers/common.go +++ b/modules/backend/handlers/common.go @@ -21,7 +21,7 @@ func (s Server) mapTitle(ctx context.Context, title sqlc.GetTitleByIDRow) (oapi. oapi_title := oapi.Title{ EpisodesAired: title.EpisodesAired, - EpisodesAll: title.EpisodesAired, + EpisodesAll: title.EpisodesAll, // EpisodesLen: &episodes_lens, Id: title.ID, // Poster: &oapi_image, @@ -41,6 +41,7 @@ func (s Server) mapTitle(ctx context.Context, title sqlc.GetTitleByIDRow) (oapi. if err != nil { return oapi.Title{}, fmt.Errorf("unmarshal TitleNames: %v", err) } + oapi_title.TitleNames = title_names if len(title.EpisodesLen) > 0 { episodes_lens := make(map[string]float64, 0) @@ -56,6 +57,7 @@ func (s Server) mapTitle(ctx context.Context, title sqlc.GetTitleByIDRow) (oapi. if err != nil { return oapi.Title{}, fmt.Errorf("unmarshalling title_tag: %v", err) } + oapi_title.Tags = oapi_tag_names var oapi_studio oapi.Studio if title.StudioName != nil { @@ -80,6 +82,7 @@ func (s Server) mapTitle(ctx context.Context, title sqlc.GetTitleByIDRow) (oapi. oapi_image.ImagePath = title.TitleImagePath oapi_image.StorageType = &title.TitleStorageType } + oapi_title.Poster = &oapi_image var release_season oapi.ReleaseSeason if title.ReleaseSeason != nil { diff --git a/modules/backend/handlers/titles.go b/modules/backend/handlers/titles.go index 054b745..ec9426c 100644 --- a/modules/backend/handlers/titles.go +++ b/modules/backend/handlers/titles.go @@ -224,7 +224,8 @@ func (s Server) GetTitles(ctx context.Context, request oapi.GetTitlesRequestObje // EpisodesLen: title.EpisodesLen, TitleStorageType: title.TitleStorageType, TitleImagePath: title.TitleImagePath, - TagNames: title.TitleNames, + TitleNames: title.TitleNames, + TagNames: title.TagNames, StudioName: title.StudioName, // StudioIllustID: title.StudioIllustID, // StudioDesc: title.StudioDesc, diff --git a/modules/backend/handlers/users.go b/modules/backend/handlers/users.go index 3a271d7..d3848f4 100644 --- a/modules/backend/handlers/users.go +++ b/modules/backend/handlers/users.go @@ -157,8 +157,9 @@ func (s Server) mapUsertitle(ctx context.Context, t sqlc.SearchUserTitlesRow) (o // EpisodesLen: title.EpisodesLen, TitleStorageType: t.TitleStorageType, TitleImagePath: t.TitleImagePath, - TagNames: t.TitleNames, StudioName: t.StudioName, + TitleNames: t.TitleNames, + TagNames: t.TagNames, // StudioIllustID: title.StudioIllustID, // StudioDesc: title.StudioDesc, // StudioStorageType: title.StudioStorageType,