mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2025-02-20 12:56:18 +00:00
Fix language constant to show correct lang in API
api/v1/instance had "en" hardcoded as language. This fix takes LANGUAGE_CODE from settings.py/.env and takes the first two letters as response.
This commit is contained in:
parent
290b740392
commit
f3b1b1d8e4
1 changed files with 2 additions and 3 deletions
|
@ -9,8 +9,7 @@ from django.utils import timezone
|
||||||
from django.views.decorators.http import require_GET
|
from django.views.decorators.http import require_GET
|
||||||
|
|
||||||
from bookwyrm import models
|
from bookwyrm import models
|
||||||
from bookwyrm.settings import DOMAIN, VERSION
|
from bookwyrm.settings import DOMAIN, VERSION, LANGUAGE_CODE
|
||||||
|
|
||||||
|
|
||||||
@require_GET
|
@require_GET
|
||||||
def webfinger(request):
|
def webfinger(request):
|
||||||
|
@ -110,7 +109,7 @@ def instance_info(_):
|
||||||
"status_count": status_count,
|
"status_count": status_count,
|
||||||
},
|
},
|
||||||
"thumbnail": logo,
|
"thumbnail": logo,
|
||||||
"languages": ["en"],
|
"languages": [LANGUAGE_CODE[:2]],
|
||||||
"registrations": site.allow_registration,
|
"registrations": site.allow_registration,
|
||||||
"approval_required": not site.allow_registration
|
"approval_required": not site.allow_registration
|
||||||
and site.allow_invite_requests,
|
and site.allow_invite_requests,
|
||||||
|
|
Loading…
Reference in a new issue