Skip to content

Commit 35fb9c7

Browse files
committed
update
1 parent c991c5c commit 35fb9c7

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/api/routes/account/apikeys/index.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { APIResponse } from "../../../utils/api-res";
77
import { APIResponseSpec, APIRouteSpec } from "../../../utils/specHelpers";
88
import { APIKeyHandler, AuthHandler, AuthUtils, SessionHandler } from "../../../utils/authHandler";
99
import { DOCS_TAGS } from "../../../docs";
10-
import { z } from "zod";
10+
import z from "zod";
1111

1212
export 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
}

0 commit comments

Comments
 (0)