Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: 그룹을 관심사 id로 쿼리할 수 있도록 구현 #35

Merged
merged 1 commit into from
Oct 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/app/application/group/query/IGroupQuery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { GroupListView } from '@sight/app/application/group/query/view/GroupList
type ListGroupParams = {
queryType: GroupListQueryType;
keyword: string | null;
interestId: string | null;
limit: number;
offset: number;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export class ListGroupQuery implements IQuery {
constructor(
readonly queryType: GroupListQueryType,
readonly keyword: string | null,
readonly interestId: string | null,
readonly limit: number,
readonly offset: number,
) {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,12 @@ describe('ListGroupQueryHandler', () => {

const queryType = GroupListQueryType.MY;
const keyword = 'keyword';
const interestId = 'interestId';
const limit = 50;
const offset = 0;

beforeEach(() => {
query = new ListGroupQuery(queryType, keyword, limit, offset);
query = new ListGroupQuery(queryType, keyword, interestId, limit, offset);
listView = ViewFixture.generateGroupListView();

groupQuery.listGroup = jest.fn().mockResolvedValue(listView);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@ export class ListGroupQueryHandler
) {}

async execute(query: ListGroupQuery): Promise<ListGroupQueryResult> {
const { queryType, keyword, limit, offset } = query;
const { queryType, keyword, interestId, limit, offset } = query;

const listView = await this.groupQuery.listGroup({
queryType,
keyword,
interestId,
limit,
offset,
});
Expand Down