Show how your profile looks to other users. This is a read-only *public view* of your profile (within the app), matching what others will see when viewing you.
()
| 10886 | return jsonify({"ok": True, "results": results}) |
| 10887 | except Exception as exc: |
| 10888 | log.exception("Weather location search failed: %s", exc) |
| 10889 | return jsonify({"ok": False, "error": "weather_search_unavailable"}), 502 |
| 10890 | |
| 10891 | |
| 10892 | @app.route("/api/weather/forecast", methods=["POST"]) |
| 10893 | @login_required |
| 10894 | def api_weather_forecast(): |
| 10895 | if _rate_limit_hit("weather_forecast", _client_ip() or "?", limit=60, window_sec=60): |
| 10896 | return jsonify({"ok": False, "error": "rate_limited"}), 429 |
| 10897 | payload = request.get_json(silent=True) or {} |
| 10898 | try: |
| 10899 | latitude = float(payload.get("latitude")) |
| 10900 | longitude = float(payload.get("longitude")) |
| 10901 | except Exception: |
| 10902 | return jsonify({"ok": False, "error": "invalid_coordinates"}), 400 |
| 10903 | if not (-90 <= latitude <= 90 and -180 <= longitude <= 180): |
| 10904 | return jsonify({"ok": False, "error": "invalid_coordinates"}), 400 |
| 10905 | lang = "el" if str(payload.get("lang") or get_lang()).lower() == "el" else "en" |
| 10906 | label = str(payload.get("label") or ("Τρέχουσα τοποθεσία" if lang == "el" else "Current location")).strip()[:160] |
nothing calls this directly
no test coverage detected