File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
src/api/routes/account/apikeys Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ import { APIResponse } from "../../../utils/api-res";
77import { APIResponseSpec , APIRouteSpec } from "../../../utils/specHelpers" ;
88import { APIKeyHandler , AuthHandler , AuthUtils , SessionHandler } from "../../../utils/authHandler" ;
99import { DOCS_TAGS } from "../../../docs" ;
10- import { z } from "zod" ;
10+ import z from "zod" ;
1111
1212export const router = new Hono ( ) . basePath ( '/apikeys' ) ;
1313
@@ -32,7 +32,12 @@ router.get('/',
3232 eq ( DB . Schema . apiKeys . user_id , authContext . user_id )
3333 ) . all ( ) ;
3434
35- const apiKeysWithoutSensitive = apiKeys . map ( key => AccountAPIKeysModel . GetById . Response . parse ( key ) ) ;
35+ const apiKeysWithoutSensitive = apiKeys . map ( key => ( {
36+ id : key . id ,
37+ description : key . description ,
38+ created_at : key . created_at ,
39+ expires_at : key . expires_at
40+ } ) ) ;
3641
3742 return APIResponse . success ( c , "API keys retrieved successfully" , apiKeysWithoutSensitive ) ;
3843 }
You can’t perform that action at this time.
0 commit comments