Skip to content

Commit

Permalink
fix(app roles): update roles api's (#693)
Browse files Browse the repository at this point in the history
  • Loading branch information
lavanya-bmw authored Apr 12, 2024
1 parent 5f1f41a commit c352216
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@
- fixed display of the description correctly
- Add Roles
- fixed empty chip display for additional roles in app overview active apps
- App Roles
- update administration app roles api's
- Company Certificate
- Show inactive certificate information in details overlay
- Fixed Automatic Up-Scrolling when Clicking on "More" Button in multiple pages
Expand Down
4 changes: 2 additions & 2 deletions src/features/admin/appuserApiSlice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export const apiSlice = createApi({
}),
fetchAppRoles: builder.query<AppRole[], string>({
query: (appId: string) =>
`/api/administration/user/app/${appId}/roles?lang=${i18next.language}`,
`/api/administration/user/owncompany/roles/apps/${appId}?languageShortName=${i18next.language}`,
}),
fetchAppUsers: builder.query<PaginResult<TenantUser>, PaginFetchArgs>({
query: (fetchArgs) =>
Expand All @@ -101,7 +101,7 @@ export const apiSlice = createApi({
),
addUserRoles: builder.mutation<UserRoleResponse, UserRoleRequest>({
query: (data: UserRoleRequest) => ({
url: `/api/administration/user/app/${data.appId}/roles`,
url: `/api/administration/user/owncompany/users/${data.companyUserId}/apps/${data.appId}/roles`,
method: 'POST',
body: data.body,
}),
Expand Down
6 changes: 4 additions & 2 deletions src/features/appManagement/apiSlice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query/react'
import { apiBaseQuery } from 'utils/rtkUtil'
import type { AppStatusDataState } from './types'
import i18next from 'i18next'

export type useCasesItem = {
useCaseId: string
Expand Down Expand Up @@ -304,7 +305,8 @@ export const apiSlice = createApi({
invalidatesTags: [Tags.APP],
}),
fetchRolesData: builder.query<rolesType[], string>({
query: (appId: string) => `api/administration/user/app/${appId}/roles`,
query: (appId: string) =>
`/api/administration/user/owncompany/roles/apps/${appId}?languageShortName=${i18next.language}`,
}),
updateRoleData: builder.mutation<postRolesResponseType[], updateRoleType>({
query: (data) => ({
Expand Down Expand Up @@ -390,7 +392,7 @@ export const apiSlice = createApi({
}),
fetchAppRoles: builder.query<RolesTypes[], string>({
query: (appId) =>
`/api/administration/user/owncompany/roles/apps/${appId}`,
`/api/apps/AppChange/${appId}/roles?languageShortName=${i18next.language}`,
}),
updateActiveApp: builder.mutation<
postRolesResponseType[],
Expand Down

0 comments on commit c352216

Please sign in to comment.