def get(self, person_id) -> Person:
     """Returns Details of Person"""
     person: Person = PersonService.retrieve(person_id)
     return person
 def get(self) -> List[Person]:
     """Returns List of all Persons."""
     return PersonService.retrieve_all()
Ejemplo n.º 3
0
 def post(self) -> Person:
     payload = request.get_json()
     new_person: Person = PersonService.create(payload)
     return new_person
Ejemplo n.º 4
0
 def get(self, person_id) -> Person:
     person: Person = PersonService.retrieve(person_id)
     return person
Ejemplo n.º 5
0
 def get(self) -> List[Person]:
     persons: List[Person] = PersonService.retrieve_all()
     return persons