Add Studio Code and Photographer to Galleries. (#4195)

* Added Studio Code and Photographer to Galleries
* Fix gallery display on mobile
* Fixed potential panic when scraping with a bad configuration
---------
Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
This commit is contained in:
bob123491234
2023-11-27 22:05:33 -06:00
committed by GitHub
parent b78771dbcd
commit d1018b4c5d
25 changed files with 243 additions and 102 deletions

View File

@@ -13,11 +13,13 @@ import (
// does not convert the relationships to other objects.
func ToBasicJSON(gallery *models.Gallery) (*jsonschema.Gallery, error) {
newGalleryJSON := jsonschema.Gallery{
Title: gallery.Title,
URLs: gallery.URLs.List(),
Details: gallery.Details,
CreatedAt: json.JSONTime{Time: gallery.CreatedAt},
UpdatedAt: json.JSONTime{Time: gallery.UpdatedAt},
Title: gallery.Title,
Code: gallery.Code,
URLs: gallery.URLs.List(),
Details: gallery.Details,
Photographer: gallery.Photographer,
CreatedAt: json.JSONTime{Time: gallery.CreatedAt},
UpdatedAt: json.JSONTime{Time: gallery.UpdatedAt},
}
if gallery.FolderID != nil {