mirror of
https://github.com/khoj-ai/khoj.git
synced 2024-11-27 17:35:07 +01:00
Fix response type of delete client tokens API endpoint
Previously the make delete API response failed, after deleting token. Required a page refresh to see that the API token was actually gone. This was happening because the response type of the delete token API endpoint isn't a string, so it failed FastAPI response validation checks.
This commit is contained in:
parent
0f4c3518d3
commit
e6da0f9a8c
1 changed files with 1 additions and 1 deletions
|
@ -86,7 +86,7 @@ def get_tokens(request: Request):
|
|||
|
||||
@auth_router.delete("/token")
|
||||
@requires(["authenticated"], redirect="login_page")
|
||||
async def delete_token(request: Request, token: str) -> str:
|
||||
async def delete_token(request: Request, token: str):
|
||||
"Delete API token for given user"
|
||||
return await delete_khoj_token(user=request.user.object, token=token)
|
||||
|
||||
|
|
Loading…
Reference in a new issue