diff --git a/lambda_function.py b/lambda_function.py index dd4f7b9..6cb01f0 100644 --- a/lambda_function.py +++ b/lambda_function.py @@ -20,7 +20,7 @@ occupants = set() -@app.route('/register', methods=['POST']) +@app.route('/people/register', methods=['POST']) def register(): data = request.json name = data['name'] @@ -29,7 +29,7 @@ def register(): return jsonify({"status": "registered", "occupants": list(occupants)}) -@app.route('/unregister', methods=['POST']) +@app.route('/people/unregister', methods=['POST']) def unregister(): data = request.json name = data['name'] @@ -38,7 +38,7 @@ def unregister(): return jsonify({"status": "unregistered", "occupants": list(occupants)}) -@app.route('/status', methods=['GET']) +@app.route('/people/status', methods=['GET']) def status(): return jsonify({ "status": "open" if occupants else "closed",