MaxKB/apps/system_manage/views/system_profile.py
2025-06-04 17:16:35 +08:00

29 lines
889 B
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# coding=utf-8
"""
@project: MaxKB
@Author虎虎
@file system_profile.py
@date2025/6/4 15:59
@desc:
"""
from django.utils.translation import gettext_lazy as _
from drf_spectacular.utils import extend_schema
from rest_framework.request import Request
from rest_framework.views import APIView
from common import result
from system_manage.api.system import SystemProfileAPI
from system_manage.serializers.system import SystemProfileSerializer
class SystemProfile(APIView):
@extend_schema(
methods=['GET'],
description=_('Get MaxKB related information'),
operation_id=_('Get MaxKB related information'), # type: ignore
responses=SystemProfileAPI.get_response(),
tags=[_('System parameters')] # type: ignore
)
def get(self, request: Request):
return result.success(SystemProfileSerializer.profile())