Paweł Łaba commited on
Commit
c54e371
·
1 Parent(s): eeff95a

zmiany w index

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -44,7 +44,7 @@ ai = TicTacToeAI()
44
  def home():
45
  return render_template("public/index.html")
46
 
47
- @app.route('/api/move', methods=['POST'])
48
  def get_move():
49
  """
50
  Endpoint do wykonania ruchu AI
@@ -80,7 +80,7 @@ def get_move():
80
 
81
 
82
  # dodaj posta dodającego do gry.json kolejne wygrane i przegrane, jako parametry dostaniesz board i win budowa pliku [{"board":[-1,1,0,-1,1,0,0,1,-1],"win":true}]
83
- @app.route('/api/game', methods=['POST'])
84
  def add_game():
85
  """
86
  Endpoint do dodania gry do pliku
@@ -129,7 +129,7 @@ def add_game():
129
 
130
 
131
 
132
- @app.route('/api/status', methods=['GET'])
133
  def get_status():
134
  """Sprawdza status modelu"""
135
  return jsonify({
@@ -139,4 +139,4 @@ def get_status():
139
  })
140
 
141
  if __name__ == '__main__':
142
- app.run(host='0.0.0.0', port=5001)
 
44
  def home():
45
  return render_template("public/index.html")
46
 
47
+ @app.route('/move', methods=['POST'])
48
  def get_move():
49
  """
50
  Endpoint do wykonania ruchu AI
 
80
 
81
 
82
  # dodaj posta dodającego do gry.json kolejne wygrane i przegrane, jako parametry dostaniesz board i win budowa pliku [{"board":[-1,1,0,-1,1,0,0,1,-1],"win":true}]
83
+ @app.route('/game', methods=['POST'])
84
  def add_game():
85
  """
86
  Endpoint do dodania gry do pliku
 
129
 
130
 
131
 
132
+ @app.route('/status', methods=['GET'])
133
  def get_status():
134
  """Sprawdza status modelu"""
135
  return jsonify({
 
139
  })
140
 
141
  if __name__ == '__main__':
142
+ app.run(host='0.0.0.0', port=7860)