diff --git a/src/api/users.ts b/src/api/users.ts index 2f5fb33..99839f1 100644 --- a/src/api/users.ts +++ b/src/api/users.ts @@ -1,5 +1,5 @@ import { BACKEND_URL } from "@/constants" -import { http } from "./common" +import { PAGE_SIZE, http } from "./common" interface ProfileField { name: string; @@ -103,9 +103,13 @@ export async function getProfile( return data } -export async function getProfiles(authToken: string): Promise { +export async function getProfiles( + authToken: string, + offset?: number, +): Promise { const url = `${BACKEND_URL}/api/v1/directory` - const response = await http(url, { authToken }) + const queryParams = { offset, limit: PAGE_SIZE } + const response = await http(url, { queryParams, authToken }) const data = await response.json() return data } diff --git a/src/views/ProfileDirectory.vue b/src/views/ProfileDirectory.vue index c4e0793..2c68d47 100644 --- a/src/views/ProfileDirectory.vue +++ b/src/views/ProfileDirectory.vue @@ -9,6 +9,13 @@ > + @@ -17,6 +24,7 @@