fix: systemSetting in UI changed unexpectedly (#1812)

Fix systemSetting in UI changed unexpectedly

Co-authored-by: Athurg Feng <athurg@gooth.org>
This commit is contained in:
Athurg Gooth
2023-06-08 22:32:57 +08:00
committed by GitHub
parent c396cc9649
commit 5d06c8093c

View File

@ -74,6 +74,7 @@ const SystemSection = () => {
...state,
allowSignUp: value,
});
globalStore.setSystemStatus({ allowSignUp: value });
await api.upsertSystemSetting({
name: "allow-signup",
value: JSON.stringify(value),
@ -197,7 +198,7 @@ const SystemSection = () => {
...state,
memoDisplayWithUpdatedTs: value,
});
globalStore.setSystemStatus({ disablePublicMemos: value });
globalStore.setSystemStatus({ memoDisplayWithUpdatedTs: value });
await api.upsertSystemSetting({
name: "memo-display-with-updated-ts",
value: JSON.stringify(value),