mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-02-28 04:36:45 +00:00
Refactor of redux tests to avoid covering RTK implementation details
This commit is contained in:
@@ -38,10 +38,7 @@ const initialState: ShortUrlCreation = {
|
||||
|
||||
export const createShortUrl = (buildShlinkApiClient: ShlinkApiClientBuilder) => createAsyncThunk(
|
||||
`${REDUCER_PREFIX}/createShortUrl`,
|
||||
(data: ShortUrlData, { getState }): Promise<ShortUrl> => {
|
||||
const { createShortUrl: shlinkCreateShortUrl } = buildShlinkApiClient(getState);
|
||||
return shlinkCreateShortUrl(data);
|
||||
},
|
||||
(data: ShortUrlData, { getState }): Promise<ShortUrl> => buildShlinkApiClient(getState).createShortUrl(data),
|
||||
);
|
||||
|
||||
export const shortUrlCreationReducerCreator = (createShortUrlThunk: ReturnType<typeof createShortUrl>) => {
|
||||
|
||||
Reference in New Issue
Block a user