diff --git a/README.md b/README.md index ba8488e..d290fde 100644 --- a/README.md +++ b/README.md @@ -131,6 +131,10 @@ yarn start This should build the frontend and open a browser. In order to have all the cookies work correctly, you have to use the same domain name. Make sure you have setup the local domains as described above. Then goto the base domain, for me that is openmhz.test, at port 3000 `openmhz.test:3000` +## Upgrading a "Frontend" server + +https://create-react-app.dev/docs/updating-to-new-releases/ + ## Managing MongoDB diff --git a/frontend/src/Call/call-data.js b/frontend/src/Call/call-data.js index 34e79d1..ecd7e6d 100644 --- a/frontend/src/Call/call-data.js +++ b/frontend/src/Call/call-data.js @@ -31,7 +31,7 @@ export const Groups = (args) => { export const Calls = (args) => { - const { data, isError, isLoading, isSuccess,error } = useGetCallsQuery(args.shortName); + const { data, isError, isLoading, isSuccess,error } = useGetCallsQuery({shortName: args.shortName}); let content diff --git a/frontend/src/features/api/apiSlice.js b/frontend/src/features/api/apiSlice.js index 4b5e77b..461b3cf 100644 --- a/frontend/src/features/api/apiSlice.js +++ b/frontend/src/features/api/apiSlice.js @@ -27,9 +27,10 @@ export const apiSlice = createApi({ }), getCalls: builder.query({ // The URL for the request is '/fakeApi/posts' - query: (shortName) => ({ + query: ({shortName,filterType=0,filterCode=0}) => ({ url: `/${shortName}/calls`, - method: "GET" //, params: { filterType, filterCode }, + method: "GET", + params: { filterType, filterCode }, }) }) })