Skip to content

Commit c1be030

Browse files
committed
Removes webhooks from the main project
1 parent 3080ec8 commit c1be030

File tree

8 files changed

+7
-122
lines changed

8 files changed

+7
-122
lines changed

docker-compose.yml

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ services:
2727
volumes:
2828
- ./:/app
2929
- ./.empty:/app/data/db
30+
- ./static:/app/static
3031
ports:
3132
- '8000:8000'
3233
depends_on:

src/main.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from models import Chat as ChatEntity
99
from models.db import engine, session
1010

11-
from settings import LOGGING_LEVEL, PLUGINS, PROJECT_CONFIG
11+
from settings import LOGGING_LEVEL, PLUGINS, PROJECT_CONFIG, STATIC_FILE_LOCATION
1212

1313
from sqlalchemy import text
1414
from pydantic import BaseModel
@@ -18,7 +18,6 @@
1818

1919
from models.helpers import create_session as db_create_session
2020
from fastapi.staticfiles import StaticFiles
21-
from webhooks.router import router
2221

2322

2423
logging.basicConfig(
@@ -44,8 +43,7 @@
4443
allow_headers=["*"],
4544
)
4645

47-
app.include_router(router, prefix="/webhooks", tags=["webhooks"])
48-
app.mount("/static", StaticFiles(directory="/app/static"), name="static")
46+
app.mount("/static", StaticFiles(directory=STATIC_FILE_LOCATION), name="static")
4947

5048
class Chat(BaseModel):
5149
message: str

src/settings.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,5 @@
2020

2121
WHATSAPP_VERIFY_TOKEN = config("WHATSAPP_VERIFY_TOKEN", "1234567890")
2222
WHATSAPP_API_TOKEN = config("WHATSAPP_API_TOKEN", "1234567890")
23-
WHATSAPP_ACCOUNT_NUMBER = config("WHATSAPP_ACCOUNT_NUMBER", "")
23+
WHATSAPP_ACCOUNT_NUMBER = config("WHATSAPP_ACCOUNT_NUMBER", "")
24+
STATIC_FILE_LOCATION = config("STATIC_FILE_LOCATION", "/app/static")

src/webhooks/__init__.py

Whitespace-only changes.

src/webhooks/responses.py

-67
This file was deleted.

src/webhooks/router.py

-46
This file was deleted.

src/webhooks/serializers.py

-4
This file was deleted.

static/.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*
2+
!.gitignore

0 commit comments

Comments
 (0)