Пример #1
0
 def patch(self):
     if current_user.is_authenticated():
         for key, val in parser.parse_args().items():
             setattr(current_user, key, val)
         db.session.commit()
         return current_user
     else:
         return unauthorized()
Пример #2
0
 def get(self):
     if current_user.is_authenticated():
         return current_user
     else:
         return unauthorized()