MSP-3105 add endpoints in apiPaths and routes in routePaths

This commit is contained in:
Anastasiia committed 2024-04-19 14:20:49 +03:00
1 parent 07b8a04782
commit 67691c58f2
3 files changed
+30 -3

No files matched your search

+1 -2
View File
@@ -6,12 +6,11 @@ import { axiosBaseQuery } from '@utils/apiUtils.ts'
import { NewRoleType, RoleType } from '@type/roles.type.ts'
const roleApi = createApi({
reducerPath: 'roleApi',
refetchOnFocus: true,
tagTypes: ['Roles'],
baseQuery: axiosBaseQuery({ baseUrl: apiPaths.baseUrl }),
baseQuery: axiosBaseQuery({ baseUrl: apiPaths.baseAdminUrl }),
endpoints: (builder) => ({
getAllRoles: builder.query<RoleType[], void>({
query: () => ({ url: apiPaths.getAllRoles }),