Skip to content

Commit

Permalink
完善接口,主页信息使用 get
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterH0323 committed Sep 7, 2024
1 parent 0ef04c1 commit 4832bae
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion frontend/src/api/dashboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ interface DashboardItem {
// 获取主控大屏信息
const getDashboardInfoRequest = () => {
return request_handler<ResultPackage<DashboardItem>>({
method: 'POST',
method: 'GET',
url: '/dashboard'
})
}
Expand Down
2 changes: 1 addition & 1 deletion server/base/base_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ async def validation_exception_handler(request, exc):
return PlainTextResponse(str(exc), status_code=400)


@app.post("/dashboard", tags=["base"], summary="获取主页信息接口")
@app.get("/dashboard", tags=["base"], summary="获取主页信息接口")
async def get_dashboard_info():
"""首页展示数据"""
fake_dashboard_data = {
Expand Down

0 comments on commit 4832bae

Please sign in to comment.