Verified Commit 3f62e5ee authored by Jakob Moser's avatar Jakob Moser
Browse files

Add status parameter to TaigaUserStoryProvider#fetch_user_stories

parent 515b0468
Loading
Loading
Loading
Loading
+4 −2
Changes for portal/model/TaigaUserStoryProvider.py: 4 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -14,8 +14,10 @@ class TaigaUserStoryProvider(Base):
    url: Mapped[str]
    authorization: Mapped[str]

    def fetch_user_stories(self) -> list[dict[str, Any]]:
        return requests.get(self.url, headers=self.headers).json()
    def fetch_user_stories(self, status: int) -> list[dict[str, Any]]:
        return requests.get(
            self.url, headers=self.headers, params={"status": status}
        ).json()

    def update_user_story(self, id: int, version: int, **kwargs: Any) -> None:
        # TODO Maybe build this in a smarter way