Skip to content

Commit 3f2c796

Browse files
committed
fix(webapp): hide misleading root API key creation dates
1 parent 1114d9d commit 3f2c796

3 files changed

Lines changed: 2 additions & 5 deletions

File tree

apps/webapp/app/presenters/v3/ApiKeysPresenter.server.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ export class ApiKeysPresenter {
7171
id: true,
7272
apiKey: true,
7373
type: true,
74-
createdAt: true,
7574
apiKeys: {
7675
where: showRevoked ? undefined : { revokedAt: null },
7776
orderBy: { createdAt: "desc" },
@@ -133,7 +132,6 @@ export class ApiKeysPresenter {
133132
name: "Root API key",
134133
value: keyEnvironment.apiKey,
135134
obfuscated: obfuscateApiKey(keyEnvironment.type, keyEnvironment.apiKey.slice(-4)),
136-
createdAt: keyEnvironment.createdAt,
137135
},
138136
apiKeys: keyEnvironment.apiKeys.map((apiKey, index) => {
139137
const { presetId, scopes, ...apiKeyData } = apiKey;

apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.apikeys/route.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -404,9 +404,7 @@ export default function Page() {
404404
<ApiKeyAccess label="No restrictions" />
405405
</TableCell>
406406
<TableCell></TableCell>
407-
<TableCell>
408-
<DateTime date={rootApiKey.createdAt} />
409-
</TableCell>
407+
<TableCell></TableCell>
410408
<TableCell></TableCell>
411409
<TableCellMenu
412410
isSticky

apps/webapp/test/apiKeysPresenter.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ containerTest(
127127
});
128128
expect(apiKeyPresets).toHaveBeenCalledWith(organization.id);
129129
expect(result.rootApiKey.obfuscated).toBe(`tr_prod_••••••••${environment.apiKey.slice(-4)}`);
130+
expect(result.rootApiKey).not.toHaveProperty("createdAt");
130131
expect(keysByName.get("Full access")?.obfuscated).toBe("tr_prod_sk_••••••••full");
131132
expect(keysByName.get("Full access")?.access).toMatchObject({
132133
presetId: null,

0 commit comments

Comments
 (0)