fix token resolve
This commit is contained in:
parent
80713f7e0f
commit
ff1f8e0452
@ -9,9 +9,11 @@ export const api = createApi({
|
|||||||
baseQuery: fetchBaseQuery({
|
baseQuery: fetchBaseQuery({
|
||||||
baseUrl: getConfigValue("journal.back.url"),
|
baseUrl: getConfigValue("journal.back.url"),
|
||||||
headers: {
|
headers: {
|
||||||
Authorization: `Bearer ${keycloak.token}`,
|
|
||||||
"Content-Type": "application/json;charset=utf-8",
|
"Content-Type": "application/json;charset=utf-8",
|
||||||
},
|
},
|
||||||
|
prepareHeaders: (headers) => {
|
||||||
|
headers.set('Authorization', `Bearer ${keycloak.token}`)
|
||||||
|
}
|
||||||
}),
|
}),
|
||||||
endpoints: (builder) => ({
|
endpoints: (builder) => ({
|
||||||
lessonList: builder.query<BaseResponse<Lesson[]>, void>({
|
lessonList: builder.query<BaseResponse<Lesson[]>, void>({
|
||||||
|
Loading…
Reference in New Issue
Block a user