mirror of
https://github.com/stashapp/stash.git
synced 2025-12-06 16:34:02 +01:00
* 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
15 lines
251 B
Go
15 lines
251 B
Go
package api
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"github.com/stashapp/stash/pkg/txn"
|
|
)
|
|
|
|
type routes struct {
|
|
txnManager txn.Manager
|
|
}
|
|
|
|
func (rs routes) withReadTxn(r *http.Request, fn txn.TxnFunc) error {
|
|
return txn.WithReadTxn(r.Context(), rs.txnManager, fn)
|
|
}
|