Beispiel #1
0
def add_contributor(username, submission_name):
    json_data = get_json_data()
    new_contributor = json_data.get("username")
    dbw = DatabaseWrapper(GITOLITE_ADMIN_PATH, DATABASE_PORT)
    try:
        dbw.add_contributor(username, submission_name, new_contributor)
        return jsonify(contributor_added=new_contributor)
    except StandardError as e:
        return jsonify({"error": "Placeholder error until exceptions are raised by the backend.", "exception": str(e)}), 404