diff --git a/kobodl/app.py b/kobodl/app.py index 002d394..ca7cfce 100644 --- a/kobodl/app.py +++ b/kobodl/app.py @@ -41,6 +41,16 @@ def users(): return render_template('users.j2', users=users, error=error) +@app.route('/user//remove', methods=['POST']) +def deleteUser(userid): + user = Globals.Settings.UserList.getUser(userid) + if not user: + abort(404) + Globals.Settings.UserList.users.remove(user) + Globals.Settings.Save() + return redirect('/user') + + @app.route('/user//book', methods=['GET']) def getUserBooks(userid, error=None, success=None): user = Globals.Settings.UserList.getUser(userid) diff --git a/kobodl/templates/users.j2 b/kobodl/templates/users.j2 index 749b6f0..0752193 100644 --- a/kobodl/templates/users.j2 +++ b/kobodl/templates/users.j2 @@ -18,6 +18,11 @@ books + +
+ +
+ {% endfor %} diff --git a/pyproject.toml b/pyproject.toml index 461fe2d..3b6d9b4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -12,7 +12,7 @@ multi_line_output = 3 [tool.poetry] name = "kobodl" -version = "0.9.3" +version = "0.9.4" description = "Kobo Book Downloader" authors = ["Brandon Davis "] license = "Unlicense"