Stash-box tagger integration (#454)

This commit is contained in:
InfiniteTF
2020-10-24 05:31:39 +02:00
committed by GitHub
parent 70f73ecf4a
commit 3346f8dcca
75 changed files with 3007 additions and 79 deletions

View File

@@ -204,6 +204,21 @@ func (r *mutationResolver) sceneUpdate(input models.SceneUpdateInput, tx *sqlx.T
}
}
// Save the stash_ids
if input.StashIds != nil {
var stashIDJoins []models.StashID
for _, stashID := range input.StashIds {
newJoin := models.StashID{
StashID: stashID.StashID,
Endpoint: stashID.Endpoint,
}
stashIDJoins = append(stashIDJoins, newJoin)
}
if err := jqb.UpdateSceneStashIDs(sceneID, stashIDJoins, tx); err != nil {
return nil, err
}
}
return scene, nil
}