Esempio n. 1
0
 def getUser(userId):
     user = Users.get(Users, userId)
     if user is None:
         return jsonify(Common.falseReturn(Common, None, '找不到数据'))
     else:
         return jsonify(Common.trueReturn(Common, Users.output(Users,
                                                               user)))
Esempio n. 2
0
 def getUsers():
     users = Users.getAll(Users)
     output = []
     for user in users:
         output.append(Users.output(Users, user))
     return jsonify(Common.trueReturn(Common, output))