Source

audrid / audrid / views / v2api / exams.py

Diff from to

audrid/views/v2api/exams.py

 # GET /exams
 # GET /exams/<id>
 #
-@app.route('/api/v1/exams', methods=['GET'])
+@app.route('/api/v2/exams', methods=['GET'])
 @authorization_required
 def exams_get_all(user=None):
     """ Return all exams. """
     return jsonify(exams=[ e.as_dict() for e in Exam.query.filter_by(deleted=False).all() ])
 
-@app.route('/api/v1/exams/<id>', methods=['GET'])
+@app.route('/api/v2/exams/<id>', methods=['GET'])
 @authorization_required
 def exams_get_one(user=None):
     """ Get one exam. """
 #
 # POST /exams
 #
-@app.route('/api/v1/exams', methods=['POST'])
+@app.route('/api/v2/exams', methods=['POST'])
 @authorization_required
 def exams_get_post(user=None):
     """ Return all exams. """
 #
 # DELETE /exams/<id>
 #
-@app.route('/api/v1/exams/<id>', methods=['DELETE'])
+@app.route('/api/v2/exams/<id>', methods=['DELETE'])
 @authorization_required
 def exams_delete_one(id, user=None):
     """ Delete one exam. """