send user's role with feedback

This commit is contained in:
Chad Pilkey 2019-11-05 13:16:34 -08:00
parent 3e7cc432d8
commit 3565331d7a

View File

@ -9,6 +9,7 @@ import logoutRouteHandler from '/imports/utils/logoutRouteHandler';
import Rating from './rating/component';
import { styles } from './styles';
import logger from '/imports/startup/client/logger';
import Users from '/imports/api/users';
const intlMessage = defineMessages({
410: {
@ -100,6 +101,12 @@ class MeetingEnded extends React.PureComponent {
this.state = {
selected: 0,
};
const user = Users.findOne({ userId: Auth.userID });
if (user) {
this.localUserRole = user.role;
}
this.setSelectedStar = this.setSelectedStar.bind(this);
this.sendFeedback = this.sendFeedback.bind(this);
this.shouldShowFeedback = getFromUserSettings('askForFeedbackOnLogout', Meteor.settings.public.app.askForFeedbackOnLogout);
@ -134,6 +141,7 @@ class MeetingEnded extends React.PureComponent {
authToken: Auth.token,
meetingId: Auth.meetingID,
comment: MeetingEnded.getComment(),
userRole: this.localUserRole,
};
const url = '/html5client/feedback';
const options = {