diff --git a/src/network/aoi.js b/src/network/aoi.js index 27de96cd..ecf6e2cc 100644 --- a/src/network/aoi.js +++ b/src/network/aoi.js @@ -89,9 +89,8 @@ export function fetchAllAOIs(token?: string): Promise<*> { } }) .then(handleErrors) - .then(res => { - return res.json(); - }); + .then(res => res.json()) + .then(res => res.results); } export function updateAOI( diff --git a/src/network/osmcha_watchlist.js b/src/network/osmcha_watchlist.js index acca38bc..1d035983 100644 --- a/src/network/osmcha_watchlist.js +++ b/src/network/osmcha_watchlist.js @@ -11,9 +11,8 @@ export function fetchWatchList(token: string): Promise<*> { } }) .then(handleErrors) - .then(res => { - return res.json(); - }); + .then(res => res.json()) + .then(res => res.results); } export function deleteFromWatchList(token: string, uid: string): Promise<*> {