Skip to content

Commit

Permalink
changing so keys are copyable
Browse files Browse the repository at this point in the history
  • Loading branch information
SirGankalot committed Jun 27, 2024
1 parent 9acd332 commit a273351
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
6 changes: 4 additions & 2 deletions service/src/templates/profil.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,10 @@ <h1 align="center">Your Keys</h1>
{% if user.private_key and user.public_key%}
<div style="word-wrap: break-word;">
<ul class="list-group list-group-flush" id="userlist">
<li class="list-group-item">Your Publickey: {{ user.public_key }}</li>
<li class="list-group-item">Your Privatekey (DO NOT SHARE): {{ user.private_key }}</li>
<li class="list-group-item">
Your Publickey: {{ user.public_key_name }}
Your Privatekey (DO NOT SHARE): {{ user.private_key_name }}
</li>
</ul>
</div>
{% else %}
Expand Down
7 changes: 7 additions & 0 deletions service/src/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,11 +220,18 @@ async def profil():
final_text = ""
for j in text:
final_text += j

private_key_name = private_key.split('\n')
private_key_name = private_key_name[1:-2]
final_private_key_name = ""
for j in private_key_name:
final_private_key_name += j


current_user.public_key = public_key
current_user.public_key_name = final_text
current_user.private_key = private_key
current_user.private_key_name = final_private_key_name
current_user.status = status
db.session.commit()
return redirect(url_for('views.profil'))
Expand Down

0 comments on commit a273351

Please sign in to comment.