refactor: many changes

- Add missing actions and make a clear boundary between actions,
  services and nfra (i.e: actions shouldn't use stuff from infra/)
- Delete stuff not in use: tts, gtts, etc
- Add a ton of tests
This commit is contained in:
cătălin 2025-03-05 11:34:44 +01:00
commit 152546982c
No known key found for this signature in database
46 changed files with 2328 additions and 700 deletions

View file

@ -4,13 +4,14 @@ from litestar import MediaType, get
from litestar.datastructures.cookie import Cookie
from litestar.response import Redirect, Template
from huesoporro.actions.authenticate import AuthenticateAction
from huesoporro.actions.users.authenticate_user import AuthenticateUserAction
from huesoporro.settings import Settings
@get(path="/o/code")
async def get_code(code: str, authenticate_action: AuthenticateAction) -> Redirect:
token = await authenticate_action.run(code)
async def get_code(code: str, authenticate_action: AuthenticateUserAction) -> Redirect:
user = await authenticate_action.run(code)
token = user.encode()
return Redirect(
"/",
cookies=[