use authtoken and connection status to verify feedback
This commit is contained in:
parent
63e8051a93
commit
5659ba10e7
@ -80,10 +80,16 @@ WebApp.connectHandlers.use('/feedback', (req, res) => {
|
||||
const {
|
||||
meetingId,
|
||||
userId,
|
||||
authToken,
|
||||
} = body;
|
||||
|
||||
const user = Users.findOne({
|
||||
meetingId,
|
||||
userId,
|
||||
connectionStatus: 'offline',
|
||||
authToken,
|
||||
});
|
||||
|
||||
const user = Users.findOne({ meetingId, userId });
|
||||
const feedback = {
|
||||
userName: user.name,
|
||||
...body,
|
||||
|
@ -88,6 +88,7 @@ class MeetingEnded extends React.PureComponent {
|
||||
selected: starNumber,
|
||||
});
|
||||
}
|
||||
|
||||
sendFeedback() {
|
||||
const {
|
||||
selected,
|
||||
@ -95,7 +96,6 @@ class MeetingEnded extends React.PureComponent {
|
||||
|
||||
const {
|
||||
router,
|
||||
userName,
|
||||
} = this.props;
|
||||
|
||||
if (selected <= 0) {
|
||||
@ -106,12 +106,11 @@ class MeetingEnded extends React.PureComponent {
|
||||
const message = {
|
||||
rating: selected,
|
||||
userId: Auth.userID,
|
||||
authToken: Auth.token,
|
||||
meetingId: Auth.meetingID,
|
||||
comment: MeetingEnded.getComment(),
|
||||
userName,
|
||||
};
|
||||
const url = '/html5client/feedback';
|
||||
|
||||
const options = {
|
||||
method: 'POST',
|
||||
body: JSON.stringify(message),
|
||||
|
Loading…
Reference in New Issue
Block a user