19 lines
570 B
Python
19 lines
570 B
Python
from rest_framework.decorators import api_view
|
|
from rest_framework.response import Response
|
|
|
|
from plugins import services
|
|
|
|
|
|
@api_view(["GET"])
|
|
def info(request):
|
|
"""Korte systeeminfo + welke modules actief zijn. Handig als gezondheidscheck."""
|
|
services.sync_states()
|
|
modules = services.describe_all()
|
|
return Response(
|
|
{
|
|
"naam": "Roostersoftware",
|
|
"fase": "0 - fundament + plugin-framework",
|
|
"modules_totaal": len(modules),
|
|
"modules_actief": sum(1 for m in modules if m["enabled"]),
|
|
}
|
|
)
|