- Add missing core module files: crud_ops.py, db_tables.py, init_db.py, user_context.py - Ensure all .dspy scripts properly use get_user() for user_id acquisition - Fix user context handling in module functions via get_current_user_id() - Maintain proper async/await patterns throughout the codebase - Complete module implementation following module-development-spec - All database operations use sqlor framework with proper user isolation
13 lines
488 B
Plaintext
13 lines
488 B
Plaintext
1|# Save appearance settings
|
|
2|# This .dspy file uses functions provided by load_hermes_web_cli()
|
|
3|
|
|
4|try:
|
|
5| theme = request.form.get('theme', 'dark')
|
|
6|
|
|
7| # Save settings using the module function
|
|
8| await save_setting('appearance', 'theme', theme)
|
|
9|
|
|
10| return {"success": True, "message": "Appearance settings saved successfully"}
|
|
11|
|
|
12|except Exception as e:
|
|
13| return {"error": str(e)} |