1
0
mirror of https://github.com/jumpserver/jumpserver.git synced 2025-05-09 08:36:28 +00:00

fix: Integration Application: No Java example in the help docs

This commit is contained in:
wangruidong 2025-03-06 17:44:19 +08:00 committed by w940853815
parent d2d9d3d841
commit bc70c480f7
2 changed files with 4 additions and 3 deletions
apps/accounts
api/account
demos/java

View File

@ -1,6 +1,7 @@
import os
from django.utils.translation import gettext_lazy as _, get_language
from django.conf import settings
from django.utils.translation import gettext_lazy as _, get_language
from rest_framework.decorators import action
from rest_framework.response import Response
@ -45,9 +46,9 @@ class IntegrationApplicationViewSet(OrgBulkModelViewSet):
'node': 'js',
'curl': 'sh',
}
sdk_language = request.query_params.get('language','python')
sdk_language = request.query_params.get('language', 'python')
sdk_path = os.path.join(settings.APPS_DIR, 'accounts', 'demos', sdk_language)
readme_path = os.path.join(sdk_path, f'readme.{get_language()}.md')
readme_path = os.path.join(sdk_path, f'README.{get_language()}.md')
demo_path = os.path.join(sdk_path, f'demo.{code_suffix_mapper[sdk_language]}')
readme_content = self.read_file(readme_path)