Browse files

Fix URIs.

  • Loading branch information...
1 parent c244a36 commit 8d4ad259d501e9f8d9768a5222a5cba75bc73048 @dsully committed Apr 6, 2012
Showing with 6 additions and 6 deletions.
  1. +6 −6 sitter/controllers.py
View
12 sitter/controllers.py
@@ -228,7 +228,7 @@ def create_sit_request():
return render_template('www/create_sit_request.html', form=form)
-@app.route('/sit_requests/accept/<id>', methods=['POST'])
+@app.route('/sit_requests/<id>/accept', methods=['POST'])
@login_required
def accept_sit_request(id):
@@ -237,7 +237,7 @@ def accept_sit_request(id):
return jsonify(message="Accepted sit request on %s, for %s." % (sit.date, sit.family.name), category='info', link=link)
-@app.route('/sit_requests/cancel/<id>', methods=['POST'])
+@app.route('/sit_requests/<id>/cancel', methods=['POST'])
@login_required
def cancel_sit_request(id):
@@ -246,7 +246,7 @@ def cancel_sit_request(id):
return jsonify(message='Cancelled sit request on %s.' % sit.date, category='info', html=html)
-@app.route('/sit_requests/decline/<id>', methods=['POST'])
+@app.route('/sit_requests/<id>/decline', methods=['POST'])
@login_required
def decline_sit_request(id):
@@ -255,7 +255,7 @@ def decline_sit_request(id):
return redirect(url_for('sit_requests'), 303)
-@app.route('/sit_requests/report/<id>', methods=['POST'])
+@app.route('/sit_requests/<id>/report', methods=['POST'])
@login_required
def report_sit_request(id):
sit = SitRequest.query.get(id)
@@ -265,7 +265,7 @@ def report_sit_request(id):
return jsonify(message='Reported %.2f hours..' % sit.reported, category='info', hours=sit.reported)
-@app.route('/sit_requests/ics/<id>', methods=['GET'])
+@app.route('/sit_requests/<id>/ics', methods=['GET'])
@login_required
def download_ics(id):
""" Download a RFC 5545 .ics file to the user's calendar. """
@@ -274,7 +274,7 @@ def download_ics(id):
return send_file(StringIO(ical), mimetype='text/calendar', as_attachment=True, attachment_filename=name)
-@app.route('/parent/vcard/<id>', methods=['GET'])
+@app.route('/parent/<id>/vcard', methods=['GET'])
@login_required
def download_vcard(id):
""" Download a RFC 2426 .vcf file to the user's address book. """

0 comments on commit 8d4ad25

Please sign in to comment.