mirror of
https://github.com/netinvent/npbackup.git
synced 2025-09-06 04:54:48 +08:00
upgrade_server: Allow a non authenticated /status page
This commit is contained in:
parent
3605728e60
commit
0114769e57
1 changed files with 10 additions and 0 deletions
|
@ -81,6 +81,16 @@ async def api_root(auth=Depends(get_current_username)):
|
|||
return {"app": "Currently under maintenance"}
|
||||
|
||||
|
||||
@app.get("/status")
|
||||
async def api_root():
|
||||
if crud.is_enabled():
|
||||
return {
|
||||
"app": "running",
|
||||
}
|
||||
else:
|
||||
return {"app": "Currently under maintenance"}
|
||||
|
||||
|
||||
@app.get("/current_version", response_model=CurrentVersion, status_code=200)
|
||||
async def current_version(
|
||||
request: Request,
|
||||
|
|
Loading…
Add table
Reference in a new issue