-
-
Notifications
You must be signed in to change notification settings - Fork 730
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: search events by user ID, not by user name (#7846)
Changes the event search handling, so that searching by user uses the user's ID, not the "createdBy" name in the event. This aligns better with what the OpenAPI schema describes it.
- Loading branch information
1 parent
507219e
commit 0934c6c
Showing
2 changed files
with
3 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -183,7 +183,7 @@ test('should filter events by created by', async () => { | |
await eventService.storeEvent({ | ||
type: FEATURE_CREATED, | ||
createdBy: '[email protected]', | ||
createdByUserId: TEST_USER_ID, | ||
createdByUserId: TEST_USER_ID + 1, | ||
ip: '127.0.0.1', | ||
}); | ||
|
||
|
@@ -194,7 +194,7 @@ test('should filter events by created by', async () => { | |
ip: '127.0.0.1', | ||
}); | ||
|
||
const { body } = await searchEvents({ createdBy: 'IS:[email protected]' }); | ||
const { body } = await searchEvents({ createdBy: `IS:${TEST_USER_ID}` }); | ||
|
||
expect(body).toMatchObject({ | ||
events: [ | ||
|