Skip to content
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
4 changes: 2 additions & 2 deletions src/client/components/UsersInChannelModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ function UserRow({
// it looks like nothing's happened in the FE atm
<DeleteButton
onClick={() => {
void update(`/channels/${org}`, 'DELETE', {
void update(`/channelMembers/${org}`, 'DELETE', {
userIDs: [user.id],
});
}}
Expand Down Expand Up @@ -191,7 +191,7 @@ function AddUsersToChannelModal({
// TODO: the org members API currently doesn't have subscriptions, so
// it looks like nothing's happened in the FE atm
const addUsers = useCallback(() => {
void update(`/channels/${channel.org}`, 'PUT', {
void update(`/channelMembers/${channel.org}`, 'PUT', {
userIDs: usersToAdd,
}).then(() => onClose());
}, [channel.org, onClose, update, usersToAdd]);
Expand Down
7 changes: 5 additions & 2 deletions src/server/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,11 @@ function main() {
app.get('/users', wrapAsyncHandler(handleGetCordUsers));
app.get('/usersData', wrapAsyncHandler(handleGetCordUsersData));

app.put('/channels/:channelName', wrapAsyncHandler(handleAddOrgMember));
app.delete('/channels/:channelName', wrapAsyncHandler(handleRemoveOrgMember));
app.put('/channelMembers/:channelName', wrapAsyncHandler(handleAddOrgMember));
app.delete(
'/channelMembers/:channelName',
wrapAsyncHandler(handleRemoveOrgMember),
);

app.put('/channels/:channelName', wrapAsyncHandler(handleAddChannel));

Expand Down