fix(settings): properly save and clear configuration values
Backend:
- Replace dict mutation with dict replacement to fix SQLAlchemy JSON
mutation tracking issue (config.config = {**config.config, **update_data})
Frontend:
- Send explicit null values instead of undefined so fields can be cleared
- Update UserConfigUpdate interface to accept null values
This commit is contained in:
@@ -9,11 +9,11 @@ export interface UserConfig {
|
||||
}
|
||||
|
||||
export interface UserConfigUpdate {
|
||||
default_editor?: string;
|
||||
theme?: string;
|
||||
git_user_name?: string;
|
||||
git_user_email?: string;
|
||||
last_session_id?: string;
|
||||
default_editor?: string | null;
|
||||
theme?: string | null;
|
||||
git_user_name?: string | null;
|
||||
git_user_email?: string | null;
|
||||
last_session_id?: string | null;
|
||||
}
|
||||
|
||||
export const getUserConfig = async (): Promise<UserConfig> => {
|
||||
|
||||
Reference in New Issue
Block a user