diff --git a/geruecht/user/routes.py b/geruecht/user/routes.py index 1ef4846..23958ce 100644 --- a/geruecht/user/routes.py +++ b/geruecht/user/routes.py @@ -3,6 +3,7 @@ from geruecht.decorator import login_required import geruecht.controller.userController as uc from geruecht.model import USER from datetime import datetime +import time user = Blueprint("user", __name__) @@ -43,6 +44,8 @@ def _saveConfig(**kwargs): accToken = kwargs['accToken'] data = request.get_json() accToken.user = userController.modifyUser(accToken.user, accToken.ldap_conn, data) - return jsonify(data) + retVal = accToken.user.toJSON() + retVal['creditList'] = {credit.year: credit.toJSON() for credit in accToken.user.geruechte} + return jsonify(retVal) except Exception as err: - return jsonify("error", err), 409 \ No newline at end of file + return jsonify({"error": err}), 409 \ No newline at end of file