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:
parent
b2185f4174
commit
152546982c
46 changed files with 2328 additions and 700 deletions
|
|
@ -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=[
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue