Add default empty value for pagespeedApiKey in settings

This commit is contained in:
Alex Holliday committed 2024-09-30 11:30:52 +08:00
1 parent 6268b2573c
commit 9b3085c84d
3 files changed
+5 -2

No files matched your search

+3 -1
View File
@@ -53,7 +53,9 @@ function App() {
const dispatch = useDispatch(); const dispatch = useDispatch();
useEffect(() => { useEffect(() => {
dispatch(getAppSettings({ authToken })); if (authToken) {
dispatch(getAppSettings({ authToken }));
}
}, [dispatch, authToken]); }, [dispatch, authToken]);
// Cleanup // Cleanup
+1 -1
View File
@@ -119,7 +119,7 @@ const AdvancedSettings = ({ isAdmin }) => {
<Stack gap={theme.spacing(20)}> <Stack gap={theme.spacing(20)}>
<Field <Field
id="apiBaseUrl" id="apiBaseUrl"
label="Client Host" label="API URL Host"
value={localSettings.apiBaseUrl} value={localSettings.apiBaseUrl}
onChange={handleChange} onChange={handleChange}
/> />
+1
View File
@@ -48,6 +48,7 @@ const AppSettingsSchema = mongoose.Schema(
}, },
pagespeedApiKey: { pagespeedApiKey: {
type: String, type: String,
default: "",
}, },
systemEmailHost: { systemEmailHost: {
type: String, type: String,