# HG changeset patch # User aparkar # Date 2013-01-22 00:56:47 # Node ID a50901f2108d481939fba45f08153a72c7f13492 # Parent d7282940d77907b4510b94c0f8194b4aa3b6372f Added repository followers to the get_repo api function result. diff --git a/rhodecode/controllers/api/api.py b/rhodecode/controllers/api/api.py --- a/rhodecode/controllers/api/api.py +++ b/rhodecode/controllers/api/api.py @@ -555,6 +555,7 @@ class ApiController(JSONRPCController): raise JSONRPCError('repository `%s` does not exist' % (repoid)) members = [] + followers = [] for user in repo.repo_to_perm: perm = user.permission.permission_name user = user.user @@ -571,8 +572,12 @@ class ApiController(JSONRPCController): users_group_data['permission'] = perm members.append(users_group_data) + for user in repo.followers: + followers.append(user.user.get_api_data()) + data = repo.get_api_data() data['members'] = members + data['followers'] = followers return data def get_repos(self, apiuser):