API: Cleanup permission endpoint
Don't return an OAI specific type from a common file. Signed-off-by: kingbri <bdashore3@proton.me>
This commit is contained in:
parent
3c08f46c51
commit
25f5d4a690
2 changed files with 5 additions and 6 deletions
|
|
@ -27,6 +27,7 @@ from common.utils import (
|
|||
handle_request_error,
|
||||
unwrap,
|
||||
)
|
||||
from endpoints.OAI.types.auth import AuthPermissionResponse
|
||||
from endpoints.OAI.types.completion import CompletionRequest
|
||||
from endpoints.OAI.types.chat_completion import ChatCompletionRequest
|
||||
from endpoints.OAI.types.lora import (
|
||||
|
|
@ -419,8 +420,8 @@ async def get_key_permission(
|
|||
test_key = coalesce(x_admin_key, x_api_key, authorization)
|
||||
|
||||
try:
|
||||
response = await validate_key_permission(test_key)
|
||||
return response
|
||||
permission = await validate_key_permission(test_key)
|
||||
return AuthPermissionResponse(permission=permission)
|
||||
except ValueError as exc:
|
||||
error_message = handle_request_error(str(exc)).error.message
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue