This commit is contained in:
pengtao 2019-07-08 19:54:59 +08:00
parent 5d0d0ac816
commit a2f853b64f

View File

@ -99,7 +99,11 @@ class Company(Resource):
# shows a list of all todos, and lets you POST to add new tasks
class CompanyList(Resource):
def get(self):
return jsonify({'code': 1, 'body': company_redis.lrang("ALL_Company", 0, -1)})
companys = self.get_company()
if companys:
return jsonify({'code': 1, 'body': companys})
else:
return jsonify({'code': 0})
def post(self):
companys = self.get_company()