Updated ApiClient to return pagination data when listing short URLs

This commit is contained in:
Alejandro Celaya
2018-06-17 17:21:47 +02:00
parent 1f157a015b
commit 66a81d7e58
3 changed files with 10 additions and 9 deletions

View File

@@ -26,7 +26,7 @@ export class ShlinkApiClient {
*/
listShortUrls = (params = {}) => {
return this._performRequest('/rest/short-codes', 'GET', params)
.then(resp => resp.data.shortUrls.data)
.then(resp => resp.data.shortUrls)
.catch(e => this._handleAuthError(e, this.listShortUrls, [params]));
};