Skip to content

Commit c7147ff

Browse files
committed
Merge remote-tracking branch 'origin/main' into dependabot/npm_and_yarn/eslint-plugin-prettier-5.5.4
2 parents b7280be + df45a47 commit c7147ff

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/pages/Dashboard.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ export default function (): React.ReactElement {
2727
} = useGetTeamsQuery(!isPlatformAdmin && skipToken)
2828
const { data: teamData } = useGetTeamQuery({ teamId: oboTeamId }, { skip: !oboTeamId || isPlatformAdmin })
2929

30-
const teamName = isPlatformView ? undefined : oboTeamId
30+
const teamId = isPlatformView ? undefined : oboTeamId
3131
const {
3232
data: dashboard,
3333
isFetching: isFetchingDashboard,
3434
refetch: refetchDashboard,
35-
} = useGetDashboardQuery({ teamName })
35+
} = useGetDashboardQuery({ teamId })
3636

3737
const isDirty = useAppSelector(({ global: { isDirty } }) => isDirty)
3838
useEffect(() => {
@@ -42,7 +42,7 @@ export default function (): React.ReactElement {
4242
}, [isDirty])
4343
const { t } = useTranslation()
4444
// END HOOKS
45-
const team = !isLoadingTeams && (find(teams, { name: teamName }) || teamData)
45+
const team = !isLoadingTeams && (find(teams, { name: teamId }) || teamData)
4646
const loading = isFetchingDashboard || isLoadingTeams
4747
const teamInventory = isPlatformView ? [{ name: 'teams', count: teams?.length }] : []
4848
const dashboardInventory = dashboard ?? ([] as any)

src/redux/otomiApi.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ const injectedRtkApi = api.injectEndpoints({
201201
query: (queryArg) => ({ url: `/v2/teams/${queryArg.teamId}/netpols/${queryArg.netpolName}`, method: 'DELETE' }),
202202
}),
203203
getDashboard: build.query<GetDashboardApiResponse, GetDashboardApiArg>({
204-
query: (queryArg) => ({ url: `/v1/dashboard`, params: { teamName: queryArg.teamName } }),
204+
query: (queryArg) => ({ url: `/v1/dashboard`, params: { teamId: queryArg.teamId } }),
205205
}),
206206
getAllBuilds: build.query<GetAllBuildsApiResponse, GetAllBuildsApiArg>({
207207
query: () => ({ url: `/v1/builds` }),
@@ -2999,7 +2999,7 @@ export type DeleteAplNetpolApiArg = {
29992999
export type GetDashboardApiResponse = /** status 200 Successfully obtained dashboard inventory data */ object
30003000
export type GetDashboardApiArg = {
30013001
/** Name of the team */
3002-
teamName?: string
3002+
teamId?: string
30033003
}
30043004
export type GetAllBuildsApiResponse = /** status 200 Successfully obtained all builds configuration */ {
30053005
id?: string

0 commit comments

Comments
 (0)