def get(self, id): try: user = UserModel.fetch_by_id(id) return user_schema.dump(user), 200 except KeyError as e: api.abort(500, e.__doc__, status="Could not perform this action", statusCode="500") except KeyError as e: api.abort(400, e.__doc__, status="Could not perform this action", statusCode="400")
def get(self,id): user = UserModel.fetch_by_id(id) return user_schema.dump(user)