@tririga/cra-template
Version:
Quickstart Create React App (CRA) template for building TRIRIGA UX Web applications using ReactJS and IBM Carbon Components.
11 lines (9 loc) • 329 B
JavaScript
import { getAppModel } from "../AppModel";
import { DatasourceNames } from "../../utils";
export async function getCurrentUser() {
const response = await getAppModel().getRecord(
DatasourceNames.CURRENT_USER_DS_NAME
);
const currentUser = response.data;
return currentUser && currentUser._id ? currentUser : null;
}