fetch attachments of items

This commit is contained in:
Nico Angelo
2023-09-29 17:16:12 +02:00
parent 94bc6b10b1
commit 382b6776ce
2 changed files with 15 additions and 4 deletions

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)