[bugfix] Fix missing hasChanged func (#3764)

This commit is contained in:
tobi 2025-02-09 12:23:16 +01:00 committed by GitHub
parent 05e89af4ec
commit 128fcc871c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 0 deletions

View file

@ -30,6 +30,7 @@
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/superseriousbusiness/gotosocial/cmd/gotosocial/action" "github.com/superseriousbusiness/gotosocial/cmd/gotosocial/action"
"github.com/superseriousbusiness/gotosocial/internal/admin"
"github.com/superseriousbusiness/gotosocial/internal/api" "github.com/superseriousbusiness/gotosocial/internal/api"
apiutil "github.com/superseriousbusiness/gotosocial/internal/api/util" apiutil "github.com/superseriousbusiness/gotosocial/internal/api/util"
"github.com/superseriousbusiness/gotosocial/internal/cleaner" "github.com/superseriousbusiness/gotosocial/internal/cleaner"
@ -133,6 +134,10 @@
// Initialize caches and database // Initialize caches and database
state.DB = testrig.NewTestDB(state) state.DB = testrig.NewTestDB(state)
// Set Actions on state, providing workers to
// Actions as well for triggering side effects.
state.AdminActions = admin.New(state.DB, &state.Workers)
// New test db inits caches so we don't need to do // New test db inits caches so we don't need to do
// that twice, we can just start the initialized caches. // that twice, we can just start the initialized caches.
state.Caches.Start() state.Caches.Start()

View file

@ -103,6 +103,7 @@ function value<T>(name: string, initialValue: T) {
name, name,
Name: "", Name: "",
value: initialValue, value: initialValue,
hasChanged: () => true,
}; };
} }