with return types from redis normalized, changed holdout homepage_lyrics_widget to return JSONResponse

This commit is contained in:
codey 2025-02-16 08:45:40 -05:00
parent f47ea0665f
commit 36975fa3f3

View File

@ -83,17 +83,17 @@ class Misc(FastAPI):
'lyricsLength': lyrics_length,
})
async def homepage_lyrics_widget(self) -> dict:
async def homepage_lyrics_widget(self) -> JSONResponse:
"""
Homepage Lyrics Widget Handler
"""
found_counts: dict = await self.redis_cache.get_found_counts()
if not isinstance(found_counts, dict):
return {
return JSONResponse(status_code=500, content={
'err': True,
'errorText': 'General failure.',
}
return found_counts
})
return JSONResponse(content=found_counts)
async def homepage_radio_widget(self) -> JSONResponse:
"""