Source code for luna_configurator.app.handlers.services_handler

# -*- coding: utf-8 -*-
"""Services group Handler

Module realize services handler.
"""

from sanic.response import HTTPResponse

from app.handlers.base_handler import BaseRequestHandler


[docs]class ServicesHandler(BaseRequestHandler): """ Handler for services. """
[docs] async def get(self) -> HTTPResponse: """ Get groups by names or services. See `spec getServices`_. .. _`spec getServices`: _static/api.html#operation/getServices """ serviceList = await self.dbContext.getServiceList() return self.success(200, outputJson={"services": list(serviceList)})