diff --git a/sipa/blueprints/usersuite.py b/sipa/blueprints/usersuite.py index 1c6cda44..69a5b257 100644 --- a/sipa/blueprints/usersuite.py +++ b/sipa/blueprints/usersuite.py @@ -3,6 +3,7 @@ from collections import OrderedDict import logging from datetime import datetime +from io import BytesIO from babel.numbers import format_currency from flask import ( @@ -14,6 +15,7 @@ abort, request, current_app, + send_file, ) from flask_babel import format_date, gettext from flask_login import current_user, login_required @@ -622,3 +624,15 @@ def reset_wifi_password(): return render_template('generic_form.html', page_title=gettext("Neues WLAN Passwort"), form_args=form_args) + + +@bp_usersuite.route("/get-wlan-apple-mobileconfig", methods=["GET"]) +@login_required +def get_wlan_apple_mobileconfig(): + """ + Get the mobileconfig for the agdsn WLAN for an Apple device. + """ + + s = "blah test" + + send_file(BytesIO(bytes(s, encoding="utf-8")), as_attachment=True)