Skip to content

Commit 8e01009

Browse files
johanbookJohan Book
and
Johan Book
authored
fix(api): fix incorrect controller type (#836)
* fix(api): fix incorrect controller type * fix(web-ui): accomodate type error --------- Co-authored-by: Johan Book <{ID}+{username}@users.noreply.github.com>
1 parent 541fefe commit 8e01009

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

services/api/src/features/chat/client/controllers/chats.controller.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export class ChatsController {
2222
}
2323

2424
@Post()
25-
async createConversation(@Query() command: CreateChatCommand): Promise<void> {
25+
async createConversation(@Body() command: CreateChatCommand): Promise<void> {
2626
return await this.commandBus.execute(command);
2727
}
2828

services/web-ui/src/features/chat/pages/CreateChatPage/CreateChatPage.container.tsx

+4-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ export function CreateChatPageContainer(): ReactElement {
2626
const createChatMutation = useMutation({
2727
mutationFn: () =>
2828
chatsApi.createConversation({
29-
profileIds: members.map((member) => member.id),
29+
createChatCommand: {
30+
profileIds: members.map((member) => member.id),
31+
},
3032
}),
3133
});
3234

@@ -46,7 +48,7 @@ export function CreateChatPageContainer(): ReactElement {
4648
);
4749
}
4850

49-
const options = data.map((x) => ({ id: x.id, label: x.name }));
51+
const options = data.map((x) => ({ id: x.profileId, label: x.name }));
5052

5153
return (
5254
<CreateChatPageNav>

0 commit comments

Comments
 (0)