mirror of
https://gitea.publichub.eu/oscar.krause/fastapi-dls.git
synced 2024-11-21 22:08:48 +00:00
added redirect for "/-/" route
This commit is contained in:
parent
fa3a06a360
commit
400c983025
@ -63,7 +63,7 @@ def get_token(request: Request) -> dict:
|
||||
return jwt.decode(token=token, key=jwt_decode_key, algorithms=ALGORITHMS.RS256, options={'verify_aud': False})
|
||||
|
||||
|
||||
@app.get('/', summary='* Index')
|
||||
@app.get('/', summary='Index')
|
||||
async def index():
|
||||
return RedirectResponse('/-/readme')
|
||||
|
||||
@ -73,6 +73,11 @@ async def status(request: Request):
|
||||
return JSONResponse({'status': 'up', 'version': VERSION, 'commit': COMMIT, 'debug': DEBUG})
|
||||
|
||||
|
||||
@app.get('/-/', summary='* Index')
|
||||
async def _index():
|
||||
return RedirectResponse('/-/readme')
|
||||
|
||||
|
||||
@app.get('/-/health', summary='* Health')
|
||||
async def _health(request: Request):
|
||||
return JSONResponse({'status': 'up', 'version': VERSION, 'commit': COMMIT, 'debug': DEBUG})
|
||||
|
@ -67,6 +67,11 @@ def test_manage():
|
||||
|
||||
|
||||
def test_client_token():
|
||||
response = client.get('/-/client-token')
|
||||
assert response.status_code == 200
|
||||
|
||||
|
||||
def test_client_token_deprecated():
|
||||
response = client.get('/client-token')
|
||||
assert response.status_code == 200
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user