debug logs
This commit is contained in:
parent
6595e5a447
commit
ae6a91174a
2 changed files with 5 additions and 0 deletions
|
|
@ -2,6 +2,7 @@ package services
|
|||
|
||||
import (
|
||||
"context"
|
||||
"log/slog"
|
||||
|
||||
"github.com/KristianJBorgwarth/dendrite.daemon/core/models"
|
||||
"github.com/KristianJBorgwarth/dendrite.daemon/core/utils"
|
||||
|
|
@ -28,6 +29,8 @@ func (s *tagService) CreateTags(ctx context.Context, dbCtx persistence.IDbContex
|
|||
return nil, err
|
||||
}
|
||||
|
||||
slog.Debug("Existing tags", "names", names, "existingTags", existingTags)
|
||||
|
||||
newTags := utils.Filter(names, func(name string) bool {
|
||||
for _, tag := range existingTags {
|
||||
if tag.Name() == name {
|
||||
|
|
@ -43,6 +46,8 @@ func (s *tagService) CreateTags(ctx context.Context, dbCtx persistence.IDbContex
|
|||
return nil, err
|
||||
}
|
||||
|
||||
slog.Debug("Created new tags", "newTags", newTagModels)
|
||||
|
||||
tags := append(existingTags, newTagModels...)
|
||||
|
||||
return tags, nil
|
||||
|
|
|
|||
BIN
dendrite
BIN
dendrite
Binary file not shown.
Loading…
Add table
Reference in a new issue