vioott commited on
Commit
65b9d17
·
1 Parent(s): 25d7c42

refactor(user): remove static genre counters and redirect to chat after profile update

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -95,11 +95,8 @@ def inicio():
95
 
96
  # Simula criação de novo ID
97
  new_id = max(user_histories.keys()) + 1
 
98
  user_histories[new_id] = {
99
- 'fiction': 0,
100
- 'non_fiction': 0,
101
- 'science': 0,
102
- 'fantasy': 0,
103
  'name': name,
104
  'preferences': preferences
105
  }
@@ -139,6 +136,8 @@ def perfil(user_id):
139
  history['name'] = name
140
  history['preferences'] = preferences
141
 
 
 
142
  return render_template(
143
  'profile.html',
144
  user_id=user_id,
 
95
 
96
  # Simula criação de novo ID
97
  new_id = max(user_histories.keys()) + 1
98
+
99
  user_histories[new_id] = {
 
 
 
 
100
  'name': name,
101
  'preferences': preferences
102
  }
 
136
  history['name'] = name
137
  history['preferences'] = preferences
138
 
139
+ return redirect(f'/chat/{user_id}')
140
+
141
  return render_template(
142
  'profile.html',
143
  user_id=user_id,