Skip to content

Commit

Permalink
added db.delete_data()
Browse files Browse the repository at this point in the history
  • Loading branch information
Equat-ion committed Jan 19, 2025
1 parent 2cd5273 commit 2eeb0b5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion core/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,9 @@ def add_password(self, service, userid, encrypted_password):
self.write_data(data)

def get_passwords(self):
return self.read_data()
return self.read_data()

def delete_password(self, service, userid):
data = self.read_data()
updated_data = [entry for entry in data if not (entry["service"] == service and entry[userid] == userid)]
self.write_data(updated_data)

0 comments on commit 2eeb0b5

Please sign in to comment.