Skip to content

Commit

Permalink
create world with base_path
Browse files Browse the repository at this point in the history
  • Loading branch information
lcduong committed Oct 9, 2024
1 parent a49e355 commit 957b01f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/venueless/api/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,15 +146,15 @@ def post(request, *args, **kwargs) -> JsonResponse:
world = World.objects.get(id=request.data.get('id'))
world.title = request.data.get('title')[request.data.get('locale')] or request.data.get('title')[
'en']
world.domain = '{}/video/{}'.format(settings.DOMAIN_PATH, request.data.get('id'))
world.domain = '{}{}/{}'.format(settings.DOMAIN_PATH, settings.BASE_PATH, request.data.get('id'))
world.locale = request.data.get('locale')
world.timezone = request.data.get('timezone')
world.save()
else:
world = World.objects.create(
id=request.data.get('id'),
title=request.data.get('title')[request.data.get('locale')] or request.data.get('title')['en'],
domain='{}/video/{}'.format(settings.DOMAIN_PATH, request.data.get('id')),
domain='{}/video/{}'.format(settings.DOMAIN_PATH, settings.BASE_PATH, request.data.get('id')),
locale=request.data.get('locale'),
timezone=request.data.get('timezone'),
config=config,
Expand Down

0 comments on commit 957b01f

Please sign in to comment.