chore: add rest api return (#3847)
This commit is contained in:
parent
261b380818
commit
518ad5f64e
|
@ -70,4 +70,10 @@ export type ChannelsEndpoints = {
|
|||
'channels.removeModerator': {
|
||||
POST: (params: { roomId: string; userId: string }) => {};
|
||||
};
|
||||
'channels.addOwner': {
|
||||
POST: (params: { roomId: string; userId: string }) => {};
|
||||
};
|
||||
'channels.removeOwner': {
|
||||
POST: (params: { roomId: string; userId: string }) => {};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -458,17 +458,14 @@ export const toggleRoomOwner = ({
|
|||
t: SubscriptionType;
|
||||
userId: string;
|
||||
isOwner: boolean;
|
||||
}): any => {
|
||||
}) => {
|
||||
const type = t as SubscriptionType.CHANNEL;
|
||||
if (isOwner) {
|
||||
// RC 0.49.4
|
||||
// TODO: missing definitions from server
|
||||
// @ts-ignore
|
||||
return sdk.post(`${roomTypeToApiType(t)}.addOwner`, { roomId, userId });
|
||||
return sdk.post(`${roomTypeToApiType(type)}.addOwner`, { roomId, userId });
|
||||
}
|
||||
// RC 0.49.4
|
||||
// TODO: missing definitions from server
|
||||
// @ts-ignore
|
||||
return sdk.post(`${roomTypeToApiType(t)}.removeOwner`, { roomId, userId });
|
||||
return sdk.post(`${roomTypeToApiType(type)}.removeOwner`, { roomId, userId });
|
||||
};
|
||||
|
||||
export const toggleRoomLeader = ({
|
||||
|
|
Loading…
Reference in New Issue