web/admin: migrate outposts to web

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer
2021-03-29 23:12:31 +02:00
parent e5ff416c2d
commit 09aa5d6350
7 changed files with 130 additions and 85 deletions

View File

@ -95,4 +95,5 @@ class OutpostViewSet(ModelViewSet):
@action(detail=False, methods=["GET"])
def default_settings(self, request: Request) -> Response:
"""Global default outpost config"""
return Response({"config": default_outpost_config(request._request.get_host())})
host = self.request.build_absolute_uri("/")
return Response({"config": default_outpost_config(host)})