Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
274674216a | ||
|
|
44c5b040d8 |
@@ -4,9 +4,8 @@ from day24.api.order_api import order_api
|
||||
app = FastAPI()
|
||||
|
||||
app.include_router(order_api,tags=['订单接口'],prefix='/orders')
|
||||
|
||||
def get_db():
|
||||
|
||||
if __name__ == '__main__':
|
||||
import uvicorn
|
||||
uvicorn.run(app,host='127.0.2.2',port=12355)
|
||||
|
||||
|
||||
+1
-1
@@ -28,7 +28,7 @@ def get_orders(order_title:str,db=Depends(get_db)):
|
||||
r = get_orders_dao(order_title,db)
|
||||
if r:
|
||||
return r
|
||||
return
|
||||
return '获取信息成功'
|
||||
|
||||
@order_api.delete('/{id}')
|
||||
def delete_orders(id:int,db=Depends(get_db)):
|
||||
|
||||
Reference in New Issue
Block a user