From 116b33418d8c0a2dd3e9e73254a24a6972c81a50 Mon Sep 17 00:00:00 2001 From: Daniel Chiquito Date: Fri, 3 Dec 2021 09:47:19 -0500 Subject: [PATCH] Fix typing on allUsers() --- client/src/django.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/client/src/django.ts b/client/src/django.ts index 3b1775cb..398a1a96 100644 --- a/client/src/django.ts +++ b/client/src/django.ts @@ -3,6 +3,13 @@ import OAuthClient from '@girder/oauth-client'; import { Project, Settings, User } from './types'; import { API_URL, OAUTH_API_ROOT, OAUTH_CLIENT_ID } from './constants'; +interface Paginated { + count: number, + next: string, + previous: string, + results: T[], +} + const apiClient = axios.create({ baseURL: API_URL }); const oauthClient = new OAuthClient(OAUTH_API_ROOT, OAUTH_CLIENT_ID); const djangoClient = { @@ -105,7 +112,7 @@ const djangoClient = { const resp = await apiClient.get('/users/me'); return resp.status === 200 ? resp.data : null; }, - async allUsers(): Promise> { + async allUsers(): Promise> { const resp = await apiClient.get('/users'); return resp.status === 200 ? resp.data : null; },