Skip to content

Commit 6cce8d1

Browse files
committed
Merge remote-tracking branch 'origin/main' into dependabot/npm_and_yarn/eslint-plugin-prettier-5.5.4
2 parents c011dce + 502d98d commit 6cce8d1

File tree

3 files changed

+14
-6
lines changed

3 files changed

+14
-6
lines changed

src/components/AccountPopover.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import React, { useState } from 'react'
44
import { useDeleteCloudttyMutation } from 'redux/otomiApi'
55
import { clearLocalStorage } from 'hooks/useLocalStorage'
66
import { useHistory } from 'react-router-dom'
7+
import { useSession } from 'providers/Session'
78
import MenuPopover from './MenuPopover'
89
import { IconButtonAnimate } from './animate'
910
import SettingMode from './SettingMode'
@@ -14,6 +15,7 @@ type Props = {
1415

1516
export default function AccountPopover({ email }: Props) {
1617
const history = useHistory()
18+
const { oboTeamId } = useSession()
1719
const [open, setOpen] = useState<HTMLElement | null>(null)
1820
const [deleteCloudtty] = useDeleteCloudttyMutation()
1921

@@ -26,7 +28,7 @@ export default function AccountPopover({ email }: Props) {
2628
}
2729

2830
const handleLogout = () => {
29-
deleteCloudtty().finally(() => {
31+
deleteCloudtty({ teamId: oboTeamId }).finally(() => {
3032
clearLocalStorage('oboTeamId')
3133
history.push('/logout')
3234
})

src/layouts/Shell.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ function Shell({ collapseClick }: Props): React.ReactElement {
189189
onSetIFrameUrl('')
190190
onToggleShell()
191191
onCloseShell()
192-
deleteCloudtty()
192+
deleteCloudtty({ teamId })
193193
}
194194

195195
return (

src/redux/otomiApi.ts

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -286,13 +286,13 @@ const injectedRtkApi = api.injectEndpoints({
286286
query: (queryArg) => ({ url: `/v2/cloudtty`, params: { teamId: queryArg.teamId } }),
287287
}),
288288
deleteAplCloudtty: build.mutation<DeleteAplCloudttyApiResponse, DeleteAplCloudttyApiArg>({
289-
query: () => ({ url: `/v2/cloudtty`, method: 'DELETE' }),
289+
query: (queryArg) => ({ url: `/v2/cloudtty`, method: 'DELETE', params: { teamId: queryArg.teamId } }),
290290
}),
291291
connectCloudtty: build.query<ConnectCloudttyApiResponse, ConnectCloudttyApiArg>({
292292
query: (queryArg) => ({ url: `/v1/cloudtty`, params: { teamId: queryArg.teamId } }),
293293
}),
294294
deleteCloudtty: build.mutation<DeleteCloudttyApiResponse, DeleteCloudttyApiArg>({
295-
query: () => ({ url: `/v1/cloudtty`, method: 'DELETE' }),
295+
query: (queryArg) => ({ url: `/v1/cloudtty`, method: 'DELETE', params: { teamId: queryArg.teamId } }),
296296
}),
297297
getAllUsers: build.query<GetAllUsersApiResponse, GetAllUsersApiArg>({
298298
query: () => ({ url: `/v1/users` }),
@@ -4274,7 +4274,10 @@ export type ConnectAplCloudttyApiArg = {
42744274
teamId?: string
42754275
}
42764276
export type DeleteAplCloudttyApiResponse = unknown
4277-
export type DeleteAplCloudttyApiArg = void
4277+
export type DeleteAplCloudttyApiArg = {
4278+
/** Id of the team */
4279+
teamId?: string
4280+
}
42784281
export type ConnectCloudttyApiResponse = /** status 200 Successfully stored cloudtty configuration */ {
42794282
iFrameUrl?: string
42804283
}
@@ -4283,7 +4286,10 @@ export type ConnectCloudttyApiArg = {
42834286
teamId?: string
42844287
}
42854288
export type DeleteCloudttyApiResponse = unknown
4286-
export type DeleteCloudttyApiArg = void
4289+
export type DeleteCloudttyApiArg = {
4290+
/** Id of the team */
4291+
teamId?: string
4292+
}
42874293
export type GetAllUsersApiResponse = /** status 200 Successfully obtained all users configuration */ {
42884294
id?: string
42894295
email: string

0 commit comments

Comments
 (0)