()
| 38 | |
| 39 | |
| 40 | def list(): |
| 41 | teams = db.query(Team).all() |
| 42 | |
| 43 | # Create a new table with the column headers |
| 44 | table = PrettyTable() |
| 45 | table.field_names = ["ID", "Mission", "Last Update"] |
| 46 | |
| 47 | # Add each team to the table as a new row |
| 48 | for team in teams: |
| 49 | table.add_row([team.id, team.name, team.updated_at]) |
| 50 | |
| 51 | # Print the table to the console |
| 52 | print(table) |
| 53 | |
| 54 | |
| 55 | def delete(id): |