Compare commits
No commits in common. "6d14ac365bbbb9d795a81b3c2028ab4fbd2c0eb4" and "62e0633e69a5bd4b658847155bb808beb34b821b" have entirely different histories.
6d14ac365b
...
62e0633e69
4 changed files with 0 additions and 21 deletions
|
|
@ -647,11 +647,6 @@ components:
|
||||||
example:
|
example:
|
||||||
- Attack on Titan
|
- Attack on Titan
|
||||||
- AoT
|
- AoT
|
||||||
title_desc:
|
|
||||||
description: 'Localized description. Key = language (ISO 639-1), value = description.'
|
|
||||||
type: object
|
|
||||||
additionalProperties:
|
|
||||||
type: string
|
|
||||||
studio:
|
studio:
|
||||||
$ref: '#/components/schemas/Studio'
|
$ref: '#/components/schemas/Studio'
|
||||||
tags:
|
tags:
|
||||||
|
|
|
||||||
|
|
@ -113,9 +113,6 @@ type Title struct {
|
||||||
// Tags Array of localized tags
|
// Tags Array of localized tags
|
||||||
Tags Tags `json:"tags"`
|
Tags Tags `json:"tags"`
|
||||||
|
|
||||||
// TitleDesc Localized description. Key = language (ISO 639-1), value = description.
|
|
||||||
TitleDesc *map[string]string `json:"title_desc,omitempty"`
|
|
||||||
|
|
||||||
// TitleNames Localized titles. Key = language (ISO 639-1), value = list of names
|
// TitleNames Localized titles. Key = language (ISO 639-1), value = list of names
|
||||||
TitleNames map[string][]string `json:"title_names"`
|
TitleNames map[string][]string `json:"title_names"`
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -30,11 +30,6 @@ properties:
|
||||||
- Титаны
|
- Титаны
|
||||||
ja:
|
ja:
|
||||||
- 進撃の巨人
|
- 進撃の巨人
|
||||||
title_desc:
|
|
||||||
type: object
|
|
||||||
description: Localized description. Key = language (ISO 639-1), value = description.
|
|
||||||
additionalProperties:
|
|
||||||
type: string
|
|
||||||
studio:
|
studio:
|
||||||
$ref: ./Studio.yaml
|
$ref: ./Studio.yaml
|
||||||
tags:
|
tags:
|
||||||
|
|
|
||||||
|
|
@ -73,14 +73,6 @@ func (s Server) mapTitle(title sqlc.GetTitleByIDRow) (oapi.Title, error) {
|
||||||
}
|
}
|
||||||
oapi_title.TitleNames = title_names
|
oapi_title.TitleNames = title_names
|
||||||
|
|
||||||
if len(title.TitleDesc) > 0 {
|
|
||||||
title_descs := make(map[string]string, 0)
|
|
||||||
err = json.Unmarshal(title.TitleDesc, &title_descs)
|
|
||||||
if err != nil {
|
|
||||||
return oapi.Title{}, fmt.Errorf("unmarshal TitleDesc: %v", err)
|
|
||||||
}
|
|
||||||
oapi_title.TitleDesc = &title_descs
|
|
||||||
}
|
|
||||||
if len(title.EpisodesLen) > 0 {
|
if len(title.EpisodesLen) > 0 {
|
||||||
episodes_lens := make(map[string]float64, 0)
|
episodes_lens := make(map[string]float64, 0)
|
||||||
err = json.Unmarshal(title.EpisodesLen, &episodes_lens)
|
err = json.Unmarshal(title.EpisodesLen, &episodes_lens)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue