From c66a42c157a8387dd2144a96b8f6a1874a002db7 Mon Sep 17 00:00:00 2001 From: Ricco Xie Date: Wed, 21 Jun 2023 14:09:05 +0800 Subject: [PATCH] Fix Key type param typos. Key type param "updateAt" should be "updatedAt" --- src/clients/client.ts | 2 +- src/types/types.ts | 2 +- tests/keys.test.ts | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/clients/client.ts b/src/clients/client.ts index ba4cc4fa6..416675dd8 100644 --- a/src/clients/client.ts +++ b/src/clients/client.ts @@ -320,7 +320,7 @@ class Client { keys.results = keys.results.map((key) => ({ ...key, createdAt: new Date(key.createdAt), - updateAt: new Date(key.updateAt), + updatedAt: new Date(key.updatedAt), })) return keys diff --git a/src/types/types.ts b/src/types/types.ts index f24ecfabb..15842c68b 100644 --- a/src/types/types.ts +++ b/src/types/types.ts @@ -448,7 +448,7 @@ export type Key = { indexes: string[] expiresAt: Date createdAt: Date - updateAt: Date + updatedAt: Date } export type KeyCreation = { diff --git a/tests/keys.test.ts b/tests/keys.test.ts index 0f3c42fe6..950b9b635 100644 --- a/tests/keys.test.ts +++ b/tests/keys.test.ts @@ -55,7 +55,7 @@ describe.each([{ permission: 'Master' }, { permission: 'Admin' }])( expect(searchKey).toHaveProperty('createdAt') expect(searchKey?.createdAt).toBeInstanceOf(Date) expect(searchKey).toHaveProperty('updatedAt') - expect(searchKey?.updateAt).toBeInstanceOf(Date) + expect(searchKey?.updatedAt).toBeInstanceOf(Date) const adminKey = keys.results.find( (key: any) => key.name === 'Default Admin API Key' @@ -73,7 +73,7 @@ describe.each([{ permission: 'Master' }, { permission: 'Admin' }])( expect(adminKey).toHaveProperty('createdAt') expect(searchKey?.createdAt).toBeInstanceOf(Date) expect(adminKey).toHaveProperty('updatedAt') - expect(searchKey?.updateAt).toBeInstanceOf(Date) + expect(searchKey?.updatedAt).toBeInstanceOf(Date) }) test(`${permission} key: get keys with pagination`, async () => {