Source code for luna_admin.app.handlers.version_handler

"""
Module with version handler.
"""
from sanic.response import HTTPResponse

from app.handlers.base_handler import BaseHandler
from app.version import VERSION


[docs]class VersionHandler(BaseHandler): """ Handler for getting version """
[docs] async def get(self) -> HTTPResponse: """ Get service version. See `spec_get_version`_. .. _spec_get_version: _static/api.html#operation/getVersion Returns: response with service version """ return self.success(200, outputJson=VERSION)