Skip to content

Commit

Permalink
Merge pull request #240 from aroskanalen/feature/964-removed-caching
Browse files Browse the repository at this point in the history
964: Removed caching from redux toolkit api
  • Loading branch information
tuj authored Apr 5, 2024
2 parents 013d299 + 333b67a commit 3245cd9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ All notable changes to this project will be documented in this file.

## [Unreleased]

- [#240](https://github.com/os2display/display-admin-client/pull/240)
- Remove caching of requests from redux toolkit api.
- [#239](https://github.com/os2display/display-admin-client/pull/239)
- Updated api integration following route change to v2.
- [#238](https://github.com/os2display/display-admin-client/pull/238)
Expand Down
1 change: 1 addition & 0 deletions src/redux/api/api.generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { createApi } from "@reduxjs/toolkit/query/react";
import extendedBaseQuery from "../dynamic-base-query";
export const api = createApi({
baseQuery: extendedBaseQuery,
keepUnusedDataFor: 0,
tagTypes: [],
endpoints: (build) => ({
getOidcAuthTokenItem: build.query<
Expand Down
2 changes: 1 addition & 1 deletion src/redux/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"scripts": {
"generate": "npx @rtk-incubator/rtk-query-codegen-openapi --hooks api.json > api.generated.ts",
"//": "# Therefore we replace into a temporary file which is then renamed to the original file",
"replace": "sed 's/import { fetchBaseQuery } from .*;/import extendedBaseQuery from \"..\\/dynamic-base-query\";/g;s/baseQuery: fetchBaseQuery.*,/baseQuery: extendedBaseQuery,/g' api.generated.ts > api.generated.ts.patched && mv api.generated.ts.patched api.generated.ts",
"replace": "sed 's/import { fetchBaseQuery } from .*;/import extendedBaseQuery from \"..\\/dynamic-base-query\";/g;s/baseQuery: fetchBaseQuery.*,/baseQuery: extendedBaseQuery,\\n keepUnusedDataFor: 0,/g' api.generated.ts > api.generated.ts.patched && mv api.generated.ts.patched api.generated.ts",
"compile": "node_modules/typescript/bin/tsc api.generated.ts",
"start": "npm run generate && npm run replace"
},
Expand Down

0 comments on commit 3245cd9

Please sign in to comment.