diff --git a/src/client/api/users.ts b/src/client/api/users.ts index 235b939a7..e85f54039 100644 --- a/src/client/api/users.ts +++ b/src/client/api/users.ts @@ -5,4 +5,12 @@ import request, { AxiosPromise } from './request'; * Get the currently authenticated user */ -export const getCurrentUser = (): AxiosPromise => request.get('/api/users/current'); +const getCurrentUser = (): AxiosPromise => request.get('/api/users/current'); + +/** + * Export the methods as part of an object so that they are stubbable. + * See: https://github.com/sinonjs/sinon/issues/562 + */ +export const UserAPI = { + getCurrentUser, +};