Skip to content

Commit

Permalink
moved files due to structure change in 1.x
Browse files Browse the repository at this point in the history
  • Loading branch information
Corepex committed May 14, 2024
1 parent 1106b9f commit a52f6f5
Show file tree
Hide file tree
Showing 15 changed files with 13 additions and 6 deletions.
14 changes: 13 additions & 1 deletion assets/js/src/core/app/api/pimcore/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,20 @@
*/

import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query/react'
import {RootState} from "@Pimcore/app/store";

export const api = createApi({
baseQuery: fetchBaseQuery({ baseUrl: '/' }),
baseQuery: fetchBaseQuery({
baseUrl: '/',
prepareHeaders: (headers, { getState }) => {
// By default, if we have a token in the store, let's use that for authenticated requests
const token = (getState() as RootState).auth?.token
if (token !== null) {
headers.set('authorization', `Bearer ${token}`)
}

return headers
}
}),
endpoints: () => ({})
})
File renamed without changes.
File renamed without changes.
File renamed without changes.
5 changes: 0 additions & 5 deletions public/build/entrypoints.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
{
"entrypoints": {
"main": {
"css": [
"http://localhost:3030/build/vendors-node_modules_ant-design_icons_es_icons_EyeTwoTone_js-node_modules_ant-design_icons_es-5f1bae.css",
"http://localhost:3030/build/main.css"
],
"js": [
"http://localhost:3030/build/vendors-node_modules_ant-design_icons_es_icons_EyeTwoTone_js-node_modules_ant-design_icons_es-5f1bae.js",
"http://localhost:3030/build/main.js"
]
}
Expand Down

0 comments on commit a52f6f5

Please sign in to comment.