Beispiel #1
0
    def get(self):
        claims = get_jwt_claims()
        print(claims)
        if not claims['active']:
            return {'message': 'Error # 171 in Customer Resource, You have not been activated by the admin'},400

        try:
            #i think we need to import this
            receive_from_client_db(HrmstModel.__tablename__, HrmstModel.__table__.c.keys())
        except Exception as e:
            print(e)

        return 'Hr data synced'
Beispiel #2
0
    def get(self):
        claims = get_jwt_claims()
        if not claims['active']:
            return {
                'message':
                'Error # 171 in Customer Resource, You have not been activated by the admin'
            }, 400
        try:
            receive_from_client_db(OpspprcModel.__tablename__,
                                   OpspprcModel.__table__.c.keys())
        except Exception as e:
            print(e)

        return 'special price data synced'
Beispiel #3
0
    def get(self):
        claims = get_jwt_claims()
        if not claims['is_superuser']:
            print(claims)
            return {
                'message':
                'Error # 28, zbusiness page, You are not authorized to see the business id list'
            }, 400
        try:
            print(
                "******************************************Call Received in Zbusiness*************************************"
            )
            receive_from_client_db(ZbusinessModel.__tablename__,
                                   ZbusinessModel.__table__.c.keys())
        except Exception as e:
            print(e)

        return 'Business List Synced'