api.py 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. import os
  2. from flask import Flask
  3. app = Flask(__name__)
  4. @app.route("/")
  5. def main():
  6. return "Funktioniert!"
  7. @app.route("/fehlerbericht", methods=["GET", "POST"])
  8. def status_report():
  9. return "Fehlerbericht"
  10. @app.route("/zeit", methods=["GET", "POST"])
  11. def adjust_time():
  12. return "Zeit"
  13. @app.route("/whitelist", methods=["GET", "POST"])
  14. def whitelist():
  15. return "Whitelist"
  16. @app.route("/changelog", methods=["GET", "POST"])
  17. def changelog():
  18. return "Changelog"
  19. @app.route("/kunden", methods=["GET", "POST"])
  20. def customers():
  21. return "Kunden"
  22. @app.route("/tickets", methods=["GET", "POST"])
  23. def tickets():
  24. return "Tickets"
  25. @app.route("/config", methods=["GET", "POST"])
  26. def config():
  27. return "Config"
  28. @app.route("/benutzer", methods=["GET", "POST"])
  29. def users():
  30. return "Benutzer"
  31. @app.route("/kommentar", methods=["GET", "POST"])
  32. def comments():
  33. return "Kommentar"
  34. @app.route("/liste", methods=["GET", "POST"])
  35. def status_list():
  36. return "Liste"
  37. if __name__ == "__main__":
  38. app.secret_key = os.urandom(24)
  39. app.run(host="0.0.0.0", port="8087", debug=True)