Browse Source

[bugfix] Fix missing `hasChanged` func (#3764)

pull/3767/head
tobi 1 year ago committed by GitHub
parent
commit
128fcc871c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 5
      cmd/gotosocial/action/testrig/testrig.go
  2. 1
      web/source/settings/lib/form/index.ts

5
cmd/gotosocial/action/testrig/testrig.go

@ -30,6 +30,7 @@ import (
"github.com/gin-gonic/gin"
"github.com/superseriousbusiness/gotosocial/cmd/gotosocial/action"
"github.com/superseriousbusiness/gotosocial/internal/admin"
"github.com/superseriousbusiness/gotosocial/internal/api"
apiutil "github.com/superseriousbusiness/gotosocial/internal/api/util"
"github.com/superseriousbusiness/gotosocial/internal/cleaner"
@ -133,6 +134,10 @@ var Start action.GTSAction = func(ctx context.Context) error {
// Initialize caches and database
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
// that twice, we can just start the initialized caches.
state.Caches.Start()

1
web/source/settings/lib/form/index.ts

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

Loading…
Cancel
Save