diff --git a/app/Line/Captcha_state.py b/app/Linebot_handler/Captcha_state.py similarity index 100% rename from app/Line/Captcha_state.py rename to app/Linebot_handler/Captcha_state.py diff --git a/app/Line/Expense.py b/app/Linebot_handler/Expense.py similarity index 98% rename from app/Line/Expense.py rename to app/Linebot_handler/Expense.py index 6b03db8..ff523fd 100644 --- a/app/Line/Expense.py +++ b/app/Linebot_handler/Expense.py @@ -2,8 +2,8 @@ import re from datetime import datetime, date from sqlalchemy.orm import Session from sqlalchemy import text -from db.models import User, LineUser, Category, CategoryRule, Expense -from db.session import SessionLocal +from DB.Models import User, LineUser, Category, CategoryRule, Expense +from DB.Session import SessionLocal EXPENSE_TEMPLATE = ( "請填寫以下記帳資料後傳回:\n\n" diff --git a/app/Line/Handlers.py b/app/Linebot_handler/Handlers.py similarity index 97% rename from app/Line/Handlers.py rename to app/Linebot_handler/Handlers.py index 8b6ce1d..0d0c8b3 100644 --- a/app/Line/Handlers.py +++ b/app/Linebot_handler/Handlers.py @@ -1,5 +1,5 @@ from line import captcha_state -from line.expense import ( +from Linebot_handler.Expense import ( EXPENSE_TEMPLATE, save_expense, delete_expense, diff --git a/app/Line/Router.py b/app/Linebot_handler/Router.py similarity index 96% rename from app/Line/Router.py rename to app/Linebot_handler/Router.py index 6166e62..f7f3ae1 100644 --- a/app/Line/Router.py +++ b/app/Linebot_handler/Router.py @@ -10,7 +10,7 @@ from linebot.v3.messaging import ( from linebot.v3.webhooks import MessageEvent, TextMessageContent, FollowEvent from linebot.v3.exceptions import InvalidSignatureError from config import LINE_CHANNEL_ACCESS_TOKEN, LINE_CHANNEL_SECRET -from line.handlers import handle_text, handle_captcha +from Linebot_handler.Handlers import handle_text, handle_captcha router = APIRouter() configuration = Configuration(access_token=LINE_CHANNEL_ACCESS_TOKEN) diff --git a/app/main.py b/app/main.py index ad49377..a2324d6 100644 --- a/app/main.py +++ b/app/main.py @@ -2,9 +2,9 @@ import nest_asyncio nest_asyncio.apply() from fastapi import FastAPI -from line.router import router as line_router -from invoice.router import router as invoice_router -from trading.router import router as trading_router +from Linebot_handler.Router import router as line_router +from Invoice.Router import router as invoice_router +from Trading.Router import router as trading_router app = FastAPI()