MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / update_profile

Function update_profile

skills/storage-helper/scripts/db_ops.py:686–697  ·  view source on GitHub ↗

Update user profile

(user_id: str, profile_json: Dict)

Source from the content-addressed store, hash-verified

684
685
686def update_profile(user_id: str, profile_json: Dict) -> bool:
687 """Update user profile"""
688 conn = get_connection()
689 cursor = conn.cursor()
690 cursor.execute("""
691 UPDATE profiles
692 SET profile_json = ?, version = ?, updated_at = CURRENT_TIMESTAMP
693 WHERE user_id = ?
694 """, (json.dumps(profile_json), profile_json.get("version", "0.1"), user_id))
695 conn.commit()
696 conn.close()
697 return True
698
699
700def get_profile_history(user_id: str, days: int = 7) -> List[Dict]:

Callers 15

mainFunction · 0.90
test_update_profileMethod · 0.90
daily_pushFunction · 0.85
cold_startFunction · 0.85
handle_reviewer_watchMethod · 0.85
handle_profile_updateMethod · 0.85
bind_chat_idFunction · 0.85

Calls 5

cursorMethod · 0.80
getMethod · 0.80
get_connectionFunction · 0.70
executeMethod · 0.45
closeMethod · 0.45

Tested by 1

test_update_profileMethod · 0.72