mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-04 21:29:12 +00: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:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user