diff --git a/src/short-urls/reducers/shortUrlsList.ts b/src/short-urls/reducers/shortUrlsList.ts index e50d931c..894975ac 100644 --- a/src/short-urls/reducers/shortUrlsList.ts +++ b/src/short-urls/reducers/shortUrlsList.ts @@ -24,7 +24,6 @@ export interface ShortUrlsList { export interface ListShortUrlsAction extends Action { shortUrls: ShlinkShortUrlsResponse; - params: ShlinkShortUrlsListParams; } export type ListShortUrlsCombinedAction = ( @@ -108,8 +107,8 @@ export const listShortUrls = (buildShlinkApiClient: ShlinkApiClientBuilder) => ( try { const shortUrls = await listShortUrls(params); - dispatch({ type: LIST_SHORT_URLS, shortUrls, params }); + dispatch({ type: LIST_SHORT_URLS, shortUrls }); } catch (e) { - dispatch({ type: LIST_SHORT_URLS_ERROR, params }); + dispatch({ type: LIST_SHORT_URLS_ERROR }); } }; diff --git a/test/short-urls/reducers/shortUrlsList.test.ts b/test/short-urls/reducers/shortUrlsList.test.ts index e4ae692d..031f6a23 100644 --- a/test/short-urls/reducers/shortUrlsList.test.ts +++ b/test/short-urls/reducers/shortUrlsList.test.ts @@ -175,7 +175,7 @@ describe('shortUrlsListReducer', () => { expect(dispatch).toHaveBeenCalledTimes(2); expect(dispatch).toHaveBeenNthCalledWith(1, { type: LIST_SHORT_URLS_START }); - expect(dispatch).toHaveBeenNthCalledWith(2, { type: LIST_SHORT_URLS, shortUrls: [], params: {} }); + expect(dispatch).toHaveBeenNthCalledWith(2, { type: LIST_SHORT_URLS, shortUrls: [] }); expect(listShortUrlsMock).toHaveBeenCalledTimes(1); }); @@ -188,7 +188,7 @@ describe('shortUrlsListReducer', () => { expect(dispatch).toHaveBeenCalledTimes(2); expect(dispatch).toHaveBeenNthCalledWith(1, { type: LIST_SHORT_URLS_START }); - expect(dispatch).toHaveBeenNthCalledWith(2, { type: LIST_SHORT_URLS_ERROR, params: {} }); + expect(dispatch).toHaveBeenNthCalledWith(2, { type: LIST_SHORT_URLS_ERROR }); expect(listShortUrlsMock).toHaveBeenCalledTimes(1); });