1
0
mirror of https://github.com/etesync/server synced 2024-11-22 08:48:07 +00:00

fix getting dashboard URL.

This commit is contained in:
Tom Hacohen 2020-12-28 14:28:42 +02:00
parent 313dcf0721
commit b3c170e10d

View File

@ -264,13 +264,12 @@ async def change_password(data: ChangePassword, request: Request, user: User = D
@authentication_router.post("/dashboard_url/", responses=permission_responses)
def dashboard_url(user: User = Depends(get_authenticated_user)):
# XXX-TOM
get_dashboard_url = app_settings.DASHBOARD_URL_FUNC
if get_dashboard_url is None:
raise HttpError("not_supported", "This server doesn't have a user dashboard.")
ret = {
"url": get_dashboard_url(request, *args, **kwargs),
"url": get_dashboard_url(CallbackContext(request.path_params, user=user)),
}
return ret