feat: Modify api key and sales channel link to use modules and add test (#6546)
This commit is contained in:
1 parent
55275f0eba
commit
196e821ff2
12 files changed
+146
-17
No files matched your search
@@ -284,6 +284,19 @@ moduleIntegrationTestRunner({
|
||||
expect(apiKeysInDatabase).toHaveLength(2)
|
||||
})
|
||||
|
||||
it("should only return keys with matching token", async function () {
|
||||
const created = await service.create([
|
||||
createPublishableKeyFixture,
|
||||
createPublishableKeyFixture,
|
||||
])
|
||||
|
||||
const apiKeysInDatabase = await service.list({
|
||||
token: created[0].token,
|
||||
})
|
||||
expect(apiKeysInDatabase).toHaveLength(1)
|
||||
expect(apiKeysInDatabase[0].token).toEqual(created[0].token)
|
||||
})
|
||||
|
||||
it("should not return the token and salt for secret keys when listing", async function () {
|
||||
await service.create([createSecretKeyFixture])
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ export const joinerConfig: ModuleJoinerConfig = {
|
||||
linkableKeys: LinkableKeys,
|
||||
alias: [
|
||||
{
|
||||
name: ["api-key", "api-keys"],
|
||||
name: ["api_key", "api_keys"],
|
||||
args: { entity: ApiKey.name },
|
||||
},
|
||||
],
|
||||
|
||||
Reference in new issue
Block a user