File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
backend/PyMatcha/routes/api/profile Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 2222from PyMatcha .models .user import get_user
2323from PyMatcha .models .view import View
2424from PyMatcha .utils .errors import NotFoundError
25+ from PyMatcha .utils .match_score import _get_distance
2526from PyMatcha .utils .success import SuccessOutput
2627
2728profile_view_bp = Blueprint ("profile_view" , __name__ )
@@ -46,4 +47,8 @@ def view_profile(uid):
4647 if current_user .id != u .id :
4748 View .create (profile_id = u .id , viewer_id = current_user .id )
4849
49- return SuccessOutput ("profile" , u .to_dict ())
50+ user_dict = u .to_dict ()
51+ # TODO: Update swagger with this
52+ user_dict ["distance" ] = _get_distance (current_user .geohash , u .geohash )
53+
54+ return SuccessOutput ("profile" , user_dict )
You can’t perform that action at this time.
0 commit comments