From 1f2b5a960706fb46c609d06e7ee4488fe21d7373 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn-Michael=20Miehe?= <40151420+ldericher@users.noreply.github.com> Date: Fri, 9 Sep 2022 00:04:13 +0000 Subject: [PATCH] get ticker ui config --- api/ovdashboard_api/routers/ticker.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/api/ovdashboard_api/routers/ticker.py b/api/ovdashboard_api/routers/ticker.py index d42e934..2f7d499 100644 --- a/api/ovdashboard_api/routers/ticker.py +++ b/api/ovdashboard_api/routers/ticker.py @@ -15,7 +15,7 @@ from typing import Iterator from fastapi import APIRouter, Depends from markdown import markdown -from ..config import Config +from ..config import Config, TickerUIConfig from ..dav_common import webdav_ensure_path from ..dav_file import DavFile from .text import text_lister, text_unique @@ -82,3 +82,13 @@ async def get_raw_ticker( ticker_content: str = Depends(get_ticker_content), ) -> str: return ticker_content + + +@ router.get( + "/config", + response_model=TickerUIConfig, +) +async def get_ui_config( + cfg: Config = Depends(Config.get), +) -> TickerUIConfig: + return cfg.ticker.ui