16 lines
455 B
JavaScript
16 lines
455 B
JavaScript
import { API } from '../utils/globals';
|
|
import KeyCloakService from '../services/KeyCloakService';
|
|
|
|
const getFullUser = async (setDataState, setLoadingState) => {
|
|
fetch(`${API}/full-user-info`, {
|
|
headers: { Authorization: `Bearer ${KeyCloakService.getToken()}` },
|
|
})
|
|
.then((response) => response.json())
|
|
.then((data) => {
|
|
setDataState(data);
|
|
if (setLoadingState) setLoadingState(false);
|
|
});
|
|
};
|
|
|
|
export default getFullUser;
|