#315 - export all follows as CSV

This commit is contained in:
dave 2019-02-06 11:17:23 -05:00
parent 6a867f6ae3
commit 2f12ac7ea4
3 changed files with 10 additions and 4 deletions

View file

@ -247,11 +247,14 @@ const fetchUser = ({id, credentials}) => {
.then((data) => parseUser(data))
}
const fetchFriends = ({id, page, credentials}) => {
const fetchFriends = ({id, page, isExport, credentials}) => {
let url = `${FRIENDS_URL}?user_id=${id}`
if (page) {
url = url + `&page=${page}`
}
if (isExport !== undefined) {
url = url + `&export=${isExport}`
}
return fetch(url, { headers: authHeaders(credentials) })
.then((data) => data.json())
.then((data) => data.map(parseUser))