diff --git a/app/cli.py b/app/cli.py index 4790af2a..4c828c8b 100644 --- a/app/cli.py +++ b/app/cli.py @@ -59,6 +59,15 @@ def register(app): print(private_key) print(public_key) + @app.cli.command("admin-keys") + def keys(): + private_key, public_key = RsaKeys.generate_keypair() + u: User = User.query.get(1) + u.private_key = private_key + u.public_key = public_key + db.session.commit() + print('Admin keys have been reset') + @app.cli.command("init-db") def init_db(): with app.app_context():