mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-01 23:20:51 +00:00
rm get_user_contacts
This commit is contained in:
@@ -160,7 +160,6 @@ urlpatterns = patterns(
|
||||
url(r'^ajax/toggle-personal-modules/$', toggle_personal_modules, name='toggle_personal_modules'),
|
||||
url(r'^ajax/my-unenc-repos/$', get_my_unenc_repos, name='get_my_unenc_repos'),
|
||||
url(r'^ajax/unenc-rw-repos/$', unenc_rw_repos, name='unenc_rw_repos'),
|
||||
url(r'^ajax/contacts/$', get_contacts, name='get_contacts'),
|
||||
url(r'^ajax/upload-file-done/$', upload_file_done, name='upload_file_done'),
|
||||
url(r'^ajax/get_popup_notices/$', get_popup_notices, name='get_popup_notices'),
|
||||
url(r'^ajax/set_notices_seen/$', set_notices_seen, name='set_notices_seen'),
|
||||
|
@@ -1082,28 +1082,6 @@ def cancel_cp(request):
|
||||
content_type=content_type)
|
||||
|
||||
########## contacts related
|
||||
@login_required_ajax
|
||||
def get_contacts(request):
|
||||
content_type = 'application/json; charset=utf-8'
|
||||
|
||||
username = request.user.username
|
||||
contacts = Contact.objects.get_contacts_by_user(username)
|
||||
contact_list = []
|
||||
from seahub.avatar.templatetags.avatar_tags import avatar
|
||||
for c in contacts:
|
||||
try:
|
||||
user = User.objects.get(email=c.contact_email)
|
||||
if user.is_active:
|
||||
contact_list.append({
|
||||
"email": c.contact_email,
|
||||
"avatar": avatar(c.contact_email, 32),
|
||||
"name": email2nickname(c.contact_email),
|
||||
})
|
||||
except User.DoesNotExist:
|
||||
continue
|
||||
|
||||
return HttpResponse(json.dumps({"contacts":contact_list}), content_type=content_type)
|
||||
|
||||
@login_required_ajax
|
||||
def get_current_commit(request, repo_id):
|
||||
content_type = 'application/json; charset=utf-8'
|
||||
|
@@ -156,7 +156,6 @@ define([
|
||||
|
||||
// Misc
|
||||
case 'thumbnail_create': return siteRoot + 'thumbnail/' + options.repo_id + '/create/';
|
||||
case 'get_user_contacts': return siteRoot + 'ajax/contacts/';
|
||||
case 'get_popup_notices': return siteRoot + 'ajax/get_popup_notices/';
|
||||
case 'set_notices_seen': return siteRoot + 'ajax/set_notices_seen/';
|
||||
case 'notifications': return siteRoot + 'api/v2.1/notifications/';
|
||||
|
Reference in New Issue
Block a user