fix: Reorder router registration to fix route matching
This commit is contained in:
parent
5c43b6e43b
commit
f4e7e8b03e
|
|
@ -30,10 +30,10 @@ app.add_middleware(
|
|||
allow_headers=["*"],
|
||||
)
|
||||
|
||||
# 라우터 등록
|
||||
app.include_router(plants.router)
|
||||
app.include_router(upload.router)
|
||||
app.include_router(stats.router)
|
||||
# 라우터 등록 (순서 중요: 더 구체적인 경로를 먼저 등록)
|
||||
app.include_router(stats.router) # /plants/{plant_id}/stats
|
||||
app.include_router(upload.router) # /plants/{plant_id}/upload
|
||||
app.include_router(plants.router) # /plants/{company_id} (가장 일반적인 경로)
|
||||
|
||||
|
||||
@app.get("/", tags=["Health"])
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user