File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -48,7 +48,19 @@ cp .env.example .env
4848# Edit `.env` to configure database connection and app settings
4949
5050# Run database migrations
51- alembic upgrade head
51+ alembic upgrade head
5252
5353# Start the development server
5454uvicorn app.main:app --reload
55+ ```
56+
57+ ### π§ Project Structure
58+ ``` text
59+ app/
60+ βββ api/ # Route declarations
61+ βββ core/ # Settings and application config
62+ βββ db/ # Database models, sessions, migrations
63+ βββ schemas/ # Pydantic data models
64+ βββ services/ # Business logic and helpers
65+ βββ main.py # FastAPI entry point
66+ ```
Original file line number Diff line number Diff line change @@ -179,7 +179,11 @@ def create_equipment(
179179 return adder (session , Equipment , equipment_data )
180180
181181
182- def make_query (table , query ):
182+ def make_query (table , query : str ):
183+ # ensure the length of the query is reasonable
184+ if len (query ) > 1000 :
185+ raise ValueError ("Query is too long" )
186+
183187 match = QUERY_REGEX .match (query )
184188 column = match .group ("field" )
185189 value = match .group ("value" )
You canβt perform that action at this time.
0 commit comments