summaryrefslogtreecommitdiffstats
path: root/client/src/admin/api/getUser.js
blob: 930ed3bc9238543171f72f62a77917d44e6cc889 (plain) (blame)
1
2
3
4
5
6
export default (setUser) => (
  fetch('/api/user/me')
    .then(res => res.json())
    .then(data => setUser(data.email))
    .catch(() => {})
);