sixfingerdev commited on
Commit
200d58e
·
verified ·
1 Parent(s): bdb83c1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -1
app.py CHANGED
@@ -839,6 +839,10 @@ HTML_TEMPLATE = r'''
839
  def index():
840
  return render_template_string(HTML_TEMPLATE, models=MODELS, provider_logos=PROVIDER_LOGOS, provider_colors=PROVIDER_COLORS)
841
 
 
 
 
 
842
  @app.route('/api/init', methods=['POST'])
843
  def init_client():
844
  global client
@@ -851,7 +855,11 @@ def init_client():
851
  with _client_lock:
852
  if client is None:
853
  client = PuterClient()
854
- run_async(client.login("sixfingerdev", "596516Enes."))
 
 
 
 
855
 
856
  return jsonify({"success": True})
857
  except Exception as e:
 
839
  def index():
840
  return render_template_string(HTML_TEMPLATE, models=MODELS, provider_logos=PROVIDER_LOGOS, provider_colors=PROVIDER_COLORS)
841
 
842
+ import os # En üste ekle
843
+
844
+ # ...
845
+
846
  @app.route('/api/init', methods=['POST'])
847
  def init_client():
848
  global client
 
855
  with _client_lock:
856
  if client is None:
857
  client = PuterClient()
858
+ # Şifreyi ortam değişkeninden al
859
+ password = os.getenv('PUTER_PASSWORD')
860
+ if not password:
861
+ raise Exception("PUTER_PASSWORD ortam değişkeni tanımlı değil!")
862
+ run_async(client.login("sixfingerdev", password))
863
 
864
  return jsonify({"success": True})
865
  except Exception as e: