Browse Source

Add @login_notrequired decorator

Harshg999 4 years ago
parent
commit
5cacf8965f

+ 0 - 1
desktop/core/src/desktop/lib/botserver/admin.py

@@ -17,4 +17,3 @@
 
 from django.contrib import admin
 
-# Register your models here.

+ 0 - 1
desktop/core/src/desktop/lib/botserver/models.py

@@ -17,4 +17,3 @@
 
 from django.db import models
 
-# Create your models here.

+ 0 - 1
desktop/core/src/desktop/lib/botserver/tests.py

@@ -17,4 +17,3 @@
 
 from django.test import TestCase
 
-# Create your tests here.

+ 2 - 1
desktop/core/src/desktop/lib/botserver/views.py

@@ -17,8 +17,9 @@
 
 from django.shortcuts import render
 from django.http import HttpResponse
+from desktop.lib.django_util import login_notrequired
 
-# Create your views here.
 
+@login_notrequired
 def home(request):
   return HttpResponse("Hello World")

+ 1 - 0
desktop/core/src/desktop/urls.py

@@ -275,6 +275,7 @@ if is_oidc_configured():
     url(r'^oidc/', include('mozilla_django_oidc.urls')),
   ]
 
+# Slack botserver URLs
 if SLACK.ENABLE_SLACK_INTEGRATION.get():
   urlpatterns += [
     url(r'^slack/', include('desktop.lib.botserver.urls')),