Пример #1
0
    def get(self):
        claims = get_jwt_claims()
        if not claims['is_superuser']:
            return {'message': 'superuser previlege required'}, 400

        vbusinessDetail = VbusinessModel.find_all_business()

        return [vbusDetail.json() for vbusDetail in vbusinessDetail], 200
Пример #2
0
    def get(self):
        claims = get_jwt_claims()
        if not claims['is_superuser']:
            return {'message': 'superuser previlege required'}, 400

        zbusinessDetail = [
            zbusDetail.json()
            for zbusDetail in ZbusinessModel.find_all_business()
        ]

        vbusinessDetail = [
            vbusDetail.json()
            for vbusDetail in VbusinessModel.find_all_business()
        ]

        vbusinessList = [z['business_id'] for z in vbusinessDetail]
        zbusinessDict = [
            d for d in zbusinessDetail if d['business_id'] not in vbusinessList
        ]

        return zbusinessDict, 200
Пример #3
0
    def get(self):
        vbusinessDetail = VbusinessModel.find_all_business()

        return [vbusDetail.json() for vbusDetail in vbusinessDetail], 200