Updated login
This commit is contained in:
parent
9b85c8fdbd
commit
ba6b0b851f
|
@ -65,7 +65,19 @@ def delete():
|
|||
|
||||
if passwordhash:
|
||||
if verify_hash == passwordhash:
|
||||
return "Your account would have been deleted... if this worked. Which it doesn't. Email postmaster@hectabit.org to delete your email."
|
||||
# return "Your account would have been deleted... if this worked. Which it doesn't. Email postmaster@hectabit.org to delete your email."
|
||||
cmd = ["maddy", "creds", "delete", key_to_fetch]
|
||||
result = subprocess.run(" ".join(cmd), shell=True, check=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||
|
||||
if result.returncode == 0:
|
||||
# Command executed successfully
|
||||
return "Email deleted!"
|
||||
else:
|
||||
# Handle errors, log them, and return False
|
||||
error_message = result.stderr.decode("utf-8")
|
||||
print(f"Error deleting email account: {error_message}")
|
||||
return "Error deleting email account!"
|
||||
|
||||
else:
|
||||
return "Incorrect email or password"
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue