rework the quote stripping

This commit is contained in:
Anton Georgiev 2014-09-18 21:19:51 +00:00
parent b7fef986d7
commit d6bfa9dbda
2 changed files with 5 additions and 4 deletions

View File

@ -14,10 +14,10 @@ login = (req, resp) ->
#use the name from the textbox
console.log "\n\nThe Username passed was=" + JSON.stringify(req.body.name) + "The Meetingname passed was=" + JSON.stringify(req.body.meetingName) + "\n\n"
joinParams.fullName = JSON.stringify req.body.name
joinParams.fullName = joinParams.fullName.replace(/['"]/g,'') # strip quotes
passedMeetingName = JSON.stringify req.body.meetingName
passedMeetingName = passedMeetingName.replace(/['"]/g,'') # stip quotes
# grab the username and the meeting name passed in. Strip the surrounding quotes
joinParams.fullName = (JSON.stringify req.body.name)?.replace(/['"]/g,'')
passedMeetingName = (JSON.stringify req.body.meetingName)?.replace(/['"]/g,'')
# use the meeting name from the form to [create if not existing and] join the meeting with such name
joinParams.meetingID = passedMeetingName

View File

@ -11,6 +11,7 @@
<input type="text" ng-model="username" placeholder="Enter a name here">
<label>Meeting name:</label>
<input type="text" ng-model="meetingName" placeholder="Enter a meeting name">
<label>(e.x. Demo Meeting)</label>
</div>
<div ng-controller="MainCtrl">
<form ng-submit="postUsername()">