mirror of
https://github.com/ijaric/voice_assistant.git
synced 2025-05-24 06:23:28 +00:00
Minor fixes
This commit is contained in:
parent
db1a2b0683
commit
0400d771e7
|
@ -5,7 +5,8 @@ WORKDIR /opt/app
|
|||
ENV PYTHONPATH '/opt/app'
|
||||
|
||||
COPY pyproject.toml ./
|
||||
RUN pip install poetry \
|
||||
RUN pip install poetry \
|
||||
&& poetry config virtualenvs.create false \
|
||||
&& poetry install --no-dev
|
||||
|
||||
COPY bin bin
|
||||
|
|
|
@ -4,4 +4,4 @@ while ! (echo > /dev/tcp/db/5432) >/dev/null 2>&1; do
|
|||
sleep 1
|
||||
done
|
||||
|
||||
exec .venv/bin/python -m bin
|
||||
exec python -m bin
|
||||
|
|
|
@ -5,14 +5,11 @@ from pydantic import ValidationError
|
|||
from lib.api.v1 import schemas as app_schemas
|
||||
from lib.app import settings as app_settings
|
||||
|
||||
app = fastapi.FastAPI()
|
||||
settings = app_settings.get_settings()
|
||||
|
||||
security = fastapi.security.HTTPBearer()
|
||||
|
||||
|
||||
def get_token_data(
|
||||
authorization: fastapi.security.HTTPAuthorizationCredentials = fastapi.Security(security),
|
||||
authorization: fastapi.security.HTTPAuthorizationCredentials = fastapi.Security(fastapi.security.HTTPBearer()),
|
||||
) -> app_schemas.entity.Token:
|
||||
token = authorization.credentials
|
||||
try:
|
||||
|
|
Loading…
Reference in New Issue
Block a user