mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
chore: update system setting name convention (#1448)
This commit is contained in:
@@ -29,7 +29,7 @@ const StorageSection = () => {
|
||||
|
||||
const handleActiveStorageServiceChanged = async (storageId: StorageId) => {
|
||||
await api.upsertSystemSetting({
|
||||
name: "storageServiceId",
|
||||
name: "storage-service-id",
|
||||
value: JSON.stringify(storageId),
|
||||
});
|
||||
await globalStore.fetchSystemStatus();
|
||||
|
@@ -57,7 +57,7 @@ const SystemSection = () => {
|
||||
|
||||
useEffect(() => {
|
||||
api.getSystemSetting().then(({ data: { data: systemSettings } }) => {
|
||||
const openAIConfigSetting = systemSettings.find((setting) => setting.name === "openAIConfig");
|
||||
const openAIConfigSetting = systemSettings.find((setting) => setting.name === "openai-config");
|
||||
if (openAIConfigSetting) {
|
||||
setOpenAIConfig(JSON.parse(openAIConfigSetting.value));
|
||||
}
|
||||
@@ -70,7 +70,7 @@ const SystemSection = () => {
|
||||
allowSignUp: value,
|
||||
});
|
||||
await api.upsertSystemSetting({
|
||||
name: "allowSignUp",
|
||||
name: "allow-signup",
|
||||
value: JSON.stringify(value),
|
||||
});
|
||||
};
|
||||
@@ -100,7 +100,7 @@ const SystemSection = () => {
|
||||
const handleSaveOpenAIConfig = async () => {
|
||||
try {
|
||||
await api.upsertSystemSetting({
|
||||
name: "openAIConfig",
|
||||
name: "openai-config",
|
||||
value: JSON.stringify(openAIConfig),
|
||||
});
|
||||
} catch (error) {
|
||||
@@ -127,7 +127,7 @@ const SystemSection = () => {
|
||||
const handleSaveAdditionalStyle = async () => {
|
||||
try {
|
||||
await api.upsertSystemSetting({
|
||||
name: "additionalStyle",
|
||||
name: "additional-style",
|
||||
value: JSON.stringify(state.additionalStyle),
|
||||
});
|
||||
} catch (error) {
|
||||
@@ -147,7 +147,7 @@ const SystemSection = () => {
|
||||
const handleSaveAdditionalScript = async () => {
|
||||
try {
|
||||
await api.upsertSystemSetting({
|
||||
name: "additionalScript",
|
||||
name: "additional-script",
|
||||
value: JSON.stringify(state.additionalScript),
|
||||
});
|
||||
} catch (error) {
|
||||
@@ -164,7 +164,7 @@ const SystemSection = () => {
|
||||
});
|
||||
globalStore.setSystemStatus({ disablePublicMemos: value });
|
||||
await api.upsertSystemSetting({
|
||||
name: "disablePublicMemos",
|
||||
name: "disable-public-memos",
|
||||
value: JSON.stringify(value),
|
||||
});
|
||||
};
|
||||
|
@@ -83,7 +83,7 @@ const UpdateCustomizedProfileDialog: React.FC<Props> = ({ destroy }: Props) => {
|
||||
|
||||
try {
|
||||
await api.upsertSystemSetting({
|
||||
name: "customizedProfile",
|
||||
name: "customized-profile",
|
||||
value: JSON.stringify(state),
|
||||
});
|
||||
await globalStore.fetchSystemStatus();
|
||||
|
@@ -23,7 +23,7 @@ const UpdateLocalStorageDialog: React.FC<Props> = (props: Props) => {
|
||||
const handleConfirmBtnClick = async () => {
|
||||
try {
|
||||
await api.upsertSystemSetting({
|
||||
name: "localStoragePath",
|
||||
name: "local-storage-path",
|
||||
value: JSON.stringify(path),
|
||||
});
|
||||
await globalStore.fetchSystemStatus();
|
||||
|
Reference in New Issue
Block a user