Beispiel #1
0
    def get(self):
        """
        handle the get request for the user_card api
        """
        try:
            data = get_user_card()

        except Exception as e:
            data = {'error': str(e)}

        self.write_json(data)
Beispiel #2
0
    def get(self):
        """
        handle the get request for the user_card api
        """
        try:
            data = get_user_card()

        except Exception as e:
            data = {'error' : str(e)}

        self.write_json(data)
Beispiel #3
0
 def get(self):
     """
     return the user card if possible, else return an error
     """
     if not users.get_current_user():
         return {'error': 'you must be logged in to view this info'}, 401
     else:
         try:
             data = get_user_card()
         except Exception as e:
             data = {'error' : str(e)}
         return data
Beispiel #4
0
 def get(self):
     """
     return the user card if possible, else return an error
     """
     if not users.get_current_user():
         return {'error': 'you must be logged in to view this info'}, 401
     else:
         try:
             data = get_user_card()
         except Exception as e:
             data = {'error': str(e)}
         return data