mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 20:34:37 +03:00
Model refactor, part 3 (#4152)
* Remove manager.Repository * Refactor other repositories * Fix tests and add database mock * Add AssertExpectations method * Refactor routes * Move default movie image to internal/static and add convenience methods * Refactor default performer image boxes
This commit is contained in:
@@ -243,7 +243,9 @@ func makeConfigUIResult() map[string]interface{} {
|
||||
}
|
||||
|
||||
func (r *queryResolver) ValidateStashBoxCredentials(ctx context.Context, input config.StashBoxInput) (*StashBoxValidationResult, error) {
|
||||
client := stashbox.NewClient(models.StashBox{Endpoint: input.Endpoint, APIKey: input.APIKey}, r.txnManager, r.stashboxRepository())
|
||||
box := models.StashBox{Endpoint: input.Endpoint, APIKey: input.APIKey}
|
||||
client := stashbox.NewClient(box, r.stashboxRepository())
|
||||
|
||||
user, err := client.GetUser(ctx)
|
||||
|
||||
valid := user != nil && user.Me != nil
|
||||
|
||||
Reference in New Issue
Block a user