Improve Redux types part 4 (#26003)
* Fix return type of addUsersToChannel * Fix type of TeamInviteWithError.error * Change Constants.Integrations.PAGE_SIZE into a number"
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
8a869b0623
Коммит
e98aa55ad7
@@ -1535,7 +1535,7 @@ export default class Client4 {
|
||||
sendEmailGuestInvitesToChannelsGracefully = async (teamId: string, channelIds: string[], emails: string[], message: string) => {
|
||||
this.trackEvent('api', 'api_teams_invite_guests', {team_id: teamId, channel_ids: channelIds});
|
||||
|
||||
return this.doFetch<TeamInviteWithError>(
|
||||
return this.doFetch<TeamInviteWithError[]>(
|
||||
`${this.getTeamRoute(teamId)}/invite-guests/email?graceful=true`,
|
||||
{method: 'post', body: JSON.stringify({emails, channels: channelIds, message})},
|
||||
);
|
||||
|
||||
@@ -109,5 +109,10 @@ export type NotPagedTeamSearchOpts = {
|
||||
|
||||
export type TeamInviteWithError = {
|
||||
email: string;
|
||||
error: ServerError;
|
||||
|
||||
// Unlike ServerError, error uses field names directly from model.AppError on the server
|
||||
error: {
|
||||
id: string;
|
||||
message: string;
|
||||
};
|
||||
};
|
||||
|
||||
Ссылка в новой задаче
Block a user