Remove temporary API used during pglister migration
authorMagnus Hagander <magnus@hagander.net>
Wed, 21 Mar 2018 09:33:54 +0000 (10:33 +0100)
committerMagnus Hagander <magnus@hagander.net>
Wed, 21 Mar 2018 12:16:43 +0000 (13:16 +0100)
pgweb/lists/views.py
pgweb/urls.py

index bb0dd5f28515a7f577a6b62bde689b169a19303f..4a951885b00462c32b373a1a391aa8daf49aa3c2 100644 (file)
@@ -24,17 +24,3 @@ def listinfo(request):
                        } for l in MailingList.objects.all()]
        json.dump({'groups': groupdata, 'lists': listdata}, resp)
        return resp
-
-# Temporary API endpoint
-def activate(request):
-       if not request.META['REMOTE_ADDR'] in settings.LIST_ACTIVATORS:
-               return HttpResponseForbidden()
-       listname = request.GET['listname']
-       active = (request.GET['active'] == '1')
-
-       l = get_object_or_404(MailingList, listname=listname)
-       if l.active == active:
-               return HttpResponse("Not changed")
-       l.active = active
-       l.save()
-       return HttpResponse("Changed")
index 4bff3d77a3c416fc4e81aa52c06243cd608825fa..a79260d50d4dd0c0f3f02203e6b18c02f5250fef 100644 (file)
@@ -68,7 +68,6 @@ urlpatterns = [
        url(r'^community/lists/subscribe/$', RedirectView.as_view(url='https://lists.postgresql.org/', permanent=True)),
 
        url(r'^community/lists/listinfo/$', pgweb.lists.views.listinfo),
-       url(r'^community/lists/activate/$', pgweb.lists.views.activate),
        url(r'^community/survey/vote/(\d+)/$', pgweb.survey.views.vote),
        url(r'^community/survey[/\.](\d+)(-.*)?/$', pgweb.survey.views.results),
        url(r'^community/user-groups/$', pgweb.pugs.views.index),