File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
services/web/server/src/simcore_service_webserver/api_keys Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change 1- from datetime import timedelta
2-
31from aiohttp import web
42from models_library .api_schemas_webserver import WEBSERVER_RPC_NAMESPACE
3+ from models_library .api_schemas_webserver .auth import ApiKeyCreateRequest
54from models_library .products import ProductName
65from models_library .rpc .webserver .auth .api_keys import ApiKeyGet
76from models_library .users import UserID
@@ -21,15 +20,14 @@ async def create_api_key(
2120 * ,
2221 user_id : UserID ,
2322 product_name : ProductName ,
24- display_name : str ,
25- expiration : timedelta | None = None ,
23+ api_key : ApiKeyCreateRequest ,
2624) -> ApiKeyGet :
2725 created_api_key : ApiKey = await _service .create_api_key (
2826 app ,
2927 user_id = user_id ,
3028 product_name = product_name ,
31- display_name = display_name ,
32- expiration = expiration ,
29+ display_name = api_key . display_name ,
30+ expiration = api_key . expiration ,
3331 )
3432
3533 return ApiKeyGet .model_validate (created_api_key )
You can’t perform that action at this time.
0 commit comments