summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2025-02-09 12:23:16 +0100
committerLibravatar GitHub <noreply@github.com>2025-02-09 12:23:16 +0100
commit128fcc871cc61986f545c9c14356a092fdc3fc8e (patch)
treefe3391f9abc2848a0c5a521aa4cf6d39034cdd89
parent[chore/frontend] Tweak display of "edited" in web UI a bit (#3766) (diff)
downloadgotosocial-128fcc871cc61986f545c9c14356a092fdc3fc8e.tar.xz
[bugfix] Fix missing `hasChanged` func (#3764)
-rw-r--r--cmd/gotosocial/action/testrig/testrig.go5
-rw-r--r--web/source/settings/lib/form/index.ts1
2 files changed, 6 insertions, 0 deletions
diff --git a/cmd/gotosocial/action/testrig/testrig.go b/cmd/gotosocial/action/testrig/testrig.go
index b19325234..05704ecb6 100644
--- a/cmd/gotosocial/action/testrig/testrig.go
+++ b/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()
diff --git a/web/source/settings/lib/form/index.ts b/web/source/settings/lib/form/index.ts
index 878b7c79b..047fdf5aa 100644
--- a/web/source/settings/lib/form/index.ts
+++ b/web/source/settings/lib/form/index.ts
@@ -103,6 +103,7 @@ function value<T>(name: string, initialValue: T) {
name,
Name: "",
value: initialValue,
+ hasChanged: () => true,
};
}