fetch attachments of items

This commit is contained in:
Nico Angelo
2023-10-16 13:10:41 +02:00
parent 94bc6b10b1
commit 382b6776ce
2 changed files with 15 additions and 4 deletions
+3 -1
View File
@@ -1,9 +1,11 @@
import json
from utils.utils import get_secret_from_bitwarden, parse_fields_scope, parse_login_scope
from utils.utils import get_secret_from_bitwarden, get_attachment, parse_fields_scope, parse_login_scope
def bitwarden_lookup(id, scope, field):
if scope == "attachment":
return get_attachment(None, id, field)
_secret_json = get_secret_from_bitwarden(None, id)
if scope == "login":
return parse_login_scope(_secret_json, field)