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