diff options
Diffstat (limited to 'src/services')
| -rw-r--r-- | src/services/ExploreService.ts | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/services/ExploreService.ts b/src/services/ExploreService.ts index 33b79b4a..4f7875dc 100644 --- a/src/services/ExploreService.ts +++ b/src/services/ExploreService.ts @@ -67,10 +67,14 @@ export const getAllExploreSections = async () => { } }; -export const getDiscoverUsers = async (id: number) => { +export const getDiscoverUsers = async (id: number, category_type: string) => { try { const token = await AsyncStorage.getItem('token'); - const response = await fetch(DISCOVER_ENDPOINT + `${id}/`, { + let url = DISCOVER_ENDPOINT + `${id}/`; + if (category_type === 'badges') { + url += '?type=badge'; + } + const response = await fetch(url, { method: 'GET', headers: { Authorization: 'Token ' + token, |
