-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1388 from gonzalo-bulnes/add-download-conversation
Add download conversation
- Loading branch information
Showing
22 changed files
with
1,141 additions
and
203 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# SPDX-License-Identifier: AGPL-3.0-or-later | ||
# Copyright © 2022 The Freedom of the Press Foundation. | ||
from typing import List | ||
|
||
from sqlalchemy.orm.session import Session | ||
|
||
from securedrop_client.db import File | ||
from securedrop_client.storage import get_local_files | ||
|
||
|
||
class Database: | ||
"""Provide an interface to the database while abstracting session details.""" | ||
|
||
def __init__(self, session: Session): | ||
super().__init__() | ||
self.session = session | ||
|
||
def get_files(self) -> List[File]: | ||
return get_local_files(self.session) |
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
Oops, something went wrong.