Skip to content

Commit

Permalink
Add auth
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevinjyp committed May 14, 2019
1 parent d79b7c0 commit d2bcfcd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions rateMyCourse/views/models.py
Expand Up @@ -14,6 +14,11 @@
def update_user_profile_photo(request):

try:
if not auth.auth(request):
return HttpResponse(json.dumps({
'status': -100,
'errMsg': 'cookies 错误',
}), content_type="application/json")
user_id = request.POST['user_id']
profile_photo = request.POST['profile_photo']
user = User.objects.get(id=user_id)
Expand Down

0 comments on commit d2bcfcd

Please sign in to comment.