fix token resolve

This commit is contained in:
Primakov Alexandr Alexandrovich 2024-02-29 22:16:57 +03:00
parent 80713f7e0f
commit ff1f8e0452

View File

@ -9,9 +9,11 @@ export const api = createApi({
baseQuery: fetchBaseQuery({
baseUrl: getConfigValue("journal.back.url"),
headers: {
Authorization: `Bearer ${keycloak.token}`,
"Content-Type": "application/json;charset=utf-8",
},
prepareHeaders: (headers) => {
headers.set('Authorization', `Bearer ${keycloak.token}`)
}
}),
endpoints: (builder) => ({
lessonList: builder.query<BaseResponse<Lesson[]>, void>({