Files
automatisch/packages/backend/src/apps/disqus/common/get-current-user.js
2024-01-16 13:23:26 +03:00

11 lines
259 B
JavaScript

const getCurrentUser = async ($) => {
try {
const { data: currentUser } = await $.http.get('/3.0/users/details.json');
return currentUser;
} catch (error) {
throw new Error('You are not authenticated.');
}
};
export default getCurrentUser;