##// END OF EJS Templates
account: use jsonify decorator
ergo -
r694:ed7b1b2e default
parent child Browse files
Show More
@@ -38,6 +38,7 b' from rhodecode.lib import auth'
38 38 from rhodecode.lib.auth import (
39 39 LoginRequired, NotAnonymous, AuthUser, generate_auth_token)
40 40 from rhodecode.lib.base import BaseController, render
41 from rhodecode.lib.utils import jsonify
41 42 from rhodecode.lib.utils2 import safe_int, md5
42 43 from rhodecode.lib.ext_json import json
43 44
@@ -361,6 +362,7 b' class MyAccountController(BaseController'
361 362 return render('admin/my_account/my_account.html')
362 363
363 364 @auth.CSRFRequired()
365 @jsonify
364 366 def my_notifications_toggle_visibility(self):
365 367 user = c.rhodecode_user.get_instance()
366 368 user_data = user.user_data
@@ -368,4 +370,4 b' class MyAccountController(BaseController'
368 370 user_data['notification_status'] = not status
369 371 user.user_data = user_data
370 372 Session().commit()
371 return json.dumps(user_data['notification_status'])
373 return user_data['notification_status']
General Comments 0
You need to be logged in to leave comments. Login now