mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-20 00:08:02 +01:00
feat: show creators from non archived features (#7309)
This commit is contained in:
parent
eb39a212ce
commit
8279da9f9b
@ -17,6 +17,7 @@ export class ProjectFlagCreatorsReadModel
|
|||||||
.distinct('users.id')
|
.distinct('users.id')
|
||||||
.join('features', 'users.id', '=', 'features.created_by_user_id')
|
.join('features', 'users.id', '=', 'features.created_by_user_id')
|
||||||
.where('features.project', project)
|
.where('features.project', project)
|
||||||
|
.where('features.archived_at', null)
|
||||||
.select([
|
.select([
|
||||||
'users.id',
|
'users.id',
|
||||||
'users.name',
|
'users.name',
|
||||||
|
@ -48,14 +48,12 @@ test('should return flag creators', async () => {
|
|||||||
})
|
})
|
||||||
.expect(200);
|
.expect(200);
|
||||||
await app.createFeature('flag-name-2');
|
await app.createFeature('flag-name-2');
|
||||||
|
await app.archiveFeature('flag-name-2');
|
||||||
|
|
||||||
const { body } = await app.request
|
const { body } = await app.request
|
||||||
.get('/api/admin/projects/default/flag-creators')
|
.get('/api/admin/projects/default/flag-creators')
|
||||||
.expect('Content-Type', /json/)
|
.expect('Content-Type', /json/)
|
||||||
.expect(200);
|
.expect(200);
|
||||||
|
|
||||||
expect(body).toEqual([
|
expect(body).toEqual([{ id: 1, name: 'user1@getunleash.io' }]);
|
||||||
{ id: 1, name: 'user1@getunleash.io' },
|
|
||||||
{ id: 2, name: 'user2@getunleash.io' },
|
|
||||||
]);
|
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user