mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-08-01 00:21:52 +00:00
Implemented first elements of short codes list
This commit is contained in:
@@ -11,12 +11,12 @@ export default function shortUrlsListReducer(state = [], action) {
|
||||
}
|
||||
}
|
||||
|
||||
export const listShortUrls = (serverId) => {
|
||||
export const listShortUrls = (serverId, params = {}) => {
|
||||
return async dispatch => {
|
||||
const selectedServer = ServersService.findServerById(serverId);
|
||||
|
||||
ShlinkApiClient.setConfig(selectedServer);
|
||||
const shortUrls = await ShlinkApiClient.listShortUrls();
|
||||
dispatch({ type: LIST_SHORT_URLS, shortUrls });
|
||||
const shortUrls = await ShlinkApiClient.listShortUrls(params);
|
||||
dispatch({ type: LIST_SHORT_URLS, shortUrls, selectedServer });
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user