Created
March 30, 2022 20:14
-
-
Save zehpatricio/2c5c8d2729d0e5d2572235989e132f25 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from typing import List | |
from app.domain.model import Location | |
from app.domain.use_cases import base_location_use_case | |
class ListLocationUseCase(base_location_use_case.BaseLocationUseCase): | |
def list(self) -> List[Location]: | |
locations = self.repository.list() | |
locations.sort(key=lambda l: l.date) | |
return locations |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment