Tag Favoriting (#4728)

* Add missing key unbind
---------
Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
This commit is contained in:
Dankonite
2024-05-08 20:04:58 -06:00
committed by GitHub
parent 1cee1ccfe2
commit 29859fa4ad
22 changed files with 162 additions and 9 deletions

View File

@@ -22,6 +22,7 @@ func ToJSON(ctx context.Context, reader FinderAliasImageGetter, tag *models.Tag)
newTagJSON := jsonschema.Tag{
Name: tag.Name,
Description: tag.Description,
Favorite: tag.Favorite,
IgnoreAutoTag: tag.IgnoreAutoTag,
CreatedAt: json.JSONTime{Time: tag.CreatedAt},
UpdatedAt: json.JSONTime{Time: tag.UpdatedAt},

View File

@@ -37,6 +37,7 @@ func createTag(id int) models.Tag {
return models.Tag{
ID: id,
Name: tagName,
Favorite: true,
Description: description,
IgnoreAutoTag: autoTagIgnored,
CreatedAt: createTime,
@@ -47,6 +48,7 @@ func createTag(id int) models.Tag {
func createJSONTag(aliases []string, image string, parents []string) *jsonschema.Tag {
return &jsonschema.Tag{
Name: tagName,
Favorite: true,
Description: description,
Aliases: aliases,
IgnoreAutoTag: autoTagIgnored,

View File

@@ -39,6 +39,7 @@ func (i *Importer) PreImport(ctx context.Context) error {
i.tag = models.Tag{
Name: i.Input.Name,
Description: i.Input.Description,
Favorite: i.Input.Favorite,
IgnoreAutoTag: i.Input.IgnoreAutoTag,
CreatedAt: i.Input.CreatedAt.GetTime(),
UpdatedAt: i.Input.UpdatedAt.GetTime(),