Add getUser back as deprecated method

Summary: On downloading  the new flipper update some of the older plugins which are on a different release cycle may try to call getUser which was removed in this stack in favour of getCached user and fetchUser, adding this back temporarily so those calls dont fail. This can be removed down the road once those plugins have soaked into the user base

Reviewed By: ivanmisuno, aigoncharov

Differential Revision: D44541277

fbshipit-source-id: 95e67d5ba11bbc26590d2789127cbf6a68c54f16
This commit is contained in:
Luke De Feo
2023-03-30 10:05:59 -07:00
committed by Facebook GitHub Bot
parent 140ca5991e
commit 2e8427f26b
2 changed files with 5 additions and 0 deletions

View File

@@ -20,6 +20,7 @@ export {
internGraphPOSTAPIRequest,
graphQLQuery,
isLoggedIn,
getUser,
fetchUser,
getCachedUser,
} from './fb-stubs/user';

View File

@@ -18,6 +18,10 @@ export function getCachedUser(): User | null {
return null;
}
export function getUser(): Promise<User | null> {
return fetchUser();
}
export async function internGraphPOSTAPIRequest(
_endpoint: string,
_formFields: {