update
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
from django.http.response import JsonResponse
|
||||
from rest_framework.views import APIView
|
||||
from django.http import HttpResponse
|
||||
|
||||
from server_auth.models import MindUser
|
||||
|
||||
|
||||
class MindUserView(APIView):
|
||||
@@ -12,4 +14,5 @@ class MindUserView(APIView):
|
||||
user_name = data_dict.get('userName')
|
||||
input_password = data_dict.get('inputPassword')
|
||||
print('userName:%s,inputPassword:%s' % (user_name, input_password))
|
||||
return HttpResponse("success")
|
||||
MindUser.objects.create_user(username=user_name, password=input_password, email='')
|
||||
return JsonResponse({"code": 0, "msg": "success"})
|
||||
|
||||
Reference in New Issue
Block a user