mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 20:34:37 +03:00
[Feature] Images new fields : URL & Date (#3015)
Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
This commit is contained in:
@@ -15,6 +15,7 @@ import (
|
||||
func ToBasicJSON(image *models.Image) *jsonschema.Image {
|
||||
newImageJSON := jsonschema.Image{
|
||||
Title: image.Title,
|
||||
URL: image.URL,
|
||||
CreatedAt: json.JSONTime{Time: image.CreatedAt},
|
||||
UpdatedAt: json.JSONTime{Time: image.UpdatedAt},
|
||||
}
|
||||
@@ -23,6 +24,10 @@ func ToBasicJSON(image *models.Image) *jsonschema.Image {
|
||||
newImageJSON.Rating = *image.Rating
|
||||
}
|
||||
|
||||
if image.Date != nil {
|
||||
newImageJSON.Date = image.Date.String()
|
||||
}
|
||||
|
||||
newImageJSON.Organized = image.Organized
|
||||
newImageJSON.OCounter = image.OCounter
|
||||
|
||||
|
||||
Reference in New Issue
Block a user