aboutsummaryrefslogtreecommitdiff
path: root/src/lb_app/api.py
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/lb_app/api.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/lb_app/api.py b/src/lb_app/api.py
index 6dfe2e8..9827828 100644
--- a/src/lb_app/api.py
+++ b/src/lb_app/api.py
@@ -41,3 +41,14 @@ class Register(Resource):
if status is None:
return loads('{"msg": "done"}'), 201
return loads('{"msg": "'+status+'"}'), 200
+
+@api.route('/users/<username>')
+@api.doc(params={'username': 'Jean'})
+class Remove(Resource):
+ def delete(self, username):
+ """ Remove a user """
+ status = user.remove(username)
+
+ if status is None:
+ return loads('{"msg": "done"}'), 201
+ return loads('{"msg": "'+status+'"}'), 200