Skip to content

Commit

Permalink
Merge #1524
Browse files Browse the repository at this point in the history
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 <ricco@riccox.com>
  • Loading branch information
meili-bors[bot] and riccox authored Jun 26, 2023
2 parents c919f08 + c66a42c commit 413d555
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/clients/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/types/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ export type Key = {
indexes: string[]
expiresAt: Date
createdAt: Date
updateAt: Date
updatedAt: Date
}

export type KeyCreation = {
Expand Down
4 changes: 2 additions & 2 deletions tests/keys.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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 () => {
Expand Down

0 comments on commit 413d555

Please sign in to comment.