Skip to content

Commit 413d555

Browse files
Merge #1524
1524: Fix Key type param typos. r=bidoubiwa a=riccox # Pull Request ## Related issue No ## What does this PR do? - Fix typos for Key type param, "updateAt" should be "updatedAt". ## PR checklist Please check if your PR fulfills the following requirements: - [x] Does this PR fix an existing issue, or have you listed the changes applied in the PR description (and why they are needed)? - [x] Have you read the contributing guidelines? - [x] Have you made sure that the title is accurate and descriptive of the changes? Thank you so much for contributing to Meilisearch! Co-authored-by: Ricco Xie <[email protected]>
2 parents c919f08 + c66a42c commit 413d555

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/clients/client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ class Client {
320320
keys.results = keys.results.map((key) => ({
321321
...key,
322322
createdAt: new Date(key.createdAt),
323-
updateAt: new Date(key.updateAt),
323+
updatedAt: new Date(key.updatedAt),
324324
}))
325325

326326
return keys

src/types/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ export type Key = {
448448
indexes: string[]
449449
expiresAt: Date
450450
createdAt: Date
451-
updateAt: Date
451+
updatedAt: Date
452452
}
453453

454454
export type KeyCreation = {

tests/keys.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ describe.each([{ permission: 'Master' }, { permission: 'Admin' }])(
5555
expect(searchKey).toHaveProperty('createdAt')
5656
expect(searchKey?.createdAt).toBeInstanceOf(Date)
5757
expect(searchKey).toHaveProperty('updatedAt')
58-
expect(searchKey?.updateAt).toBeInstanceOf(Date)
58+
expect(searchKey?.updatedAt).toBeInstanceOf(Date)
5959

6060
const adminKey = keys.results.find(
6161
(key: any) => key.name === 'Default Admin API Key'
@@ -73,7 +73,7 @@ describe.each([{ permission: 'Master' }, { permission: 'Admin' }])(
7373
expect(adminKey).toHaveProperty('createdAt')
7474
expect(searchKey?.createdAt).toBeInstanceOf(Date)
7575
expect(adminKey).toHaveProperty('updatedAt')
76-
expect(searchKey?.updateAt).toBeInstanceOf(Date)
76+
expect(searchKey?.updatedAt).toBeInstanceOf(Date)
7777
})
7878

7979
test(`${permission} key: get keys with pagination`, async () => {

0 commit comments

Comments
 (0)