Skip to content
Snippets Groups Projects
Commit 8b897ec1 authored by Tim Kreuzer's avatar Tim Kreuzer
Browse files

update new frontend handler

parent 947e83b6
Branches
Tags
No related merge requests found
......@@ -14,7 +14,7 @@ from .misc import NoXSRFCheckAPIHandler
class FHostnameAPIHandler(NoXSRFCheckAPIHandler):
async def get(self):
self.set_header("Cache-Control", "no-cache")
self.write(jhub_hostname)
self.write(jhub_hostname.encode())
self.set_status(200)
return
......@@ -122,6 +122,8 @@ class FUserOptionsAPIHandler(NoXSRFCheckAPIHandler):
user = self.current_user
if user is not None:
user_options = await async_decrypted_user_options(user)
if "" in user_options.keys():
del user_options[""]
self.write(json.dumps(user_options))
self.set_status(200)
return
......@@ -145,7 +147,10 @@ class FUserAPIHandler(NoXSRFCheckAPIHandler):
ret["backendServices"] = (custom_config.get("backendServices", {}),)
ret["incidents"] = get_incidents(user)
ret["reservations"] = (get_reservations(),)
ret["decrypted_user_options"] = await async_decrypted_user_options
user_options = await async_decrypted_user_options(user)
if "" in user_options.keys():
del user_options[""]
ret["decrypted_user_options"] = user_options
self.write(json.dumps(ret))
self.set_status(200)
return
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment