forge
Explore
Log in

Don't you dare go Hollow

hezarfen_frontend

Clone
★ 0

0 watching0 forksTypeScript5.5 MiBd962efeBurak Boduroğlu4 months ago146 commits

getUsers.ts8 lines, 367 bytesHistoryRawDownload
1import { client } from "./client";
2import { normalizePage, pageQuery, type Page, type PageParams } from "./page";
3import type { User } from "./types";
4
5export async function getUsers(params?: PageParams, signal?: AbortSignal): Promise<Page<User>> {
6 const data = await client<unknown>(`/users${pageQuery(params)}`, { signal });
7 return normalizePage<User>(data);
8}