Skip to content

Commit

Permalink
Merge pull request rambl#62 from tmoc/master
Browse files Browse the repository at this point in the history
Improved some comments.
  • Loading branch information
tmoc committed Jul 22, 2014
2 parents 6498543 + d510278 commit 787c115
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 7 deletions.
2 changes: 2 additions & 0 deletions client/app/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ angular.module('ramblApp',

$httpProvider.interceptors.push('AttachTokens');
}])

.factory('AttachTokens', ['$window',
function ($window) {
var attach = {
Expand All @@ -51,6 +52,7 @@ angular.module('ramblApp',
};
return attach;
}])

.run(['$rootScope', '$location', '$window', 'Auth',
function($rootScope, $location, $window, Auth) {

Expand Down
4 changes: 2 additions & 2 deletions client/app/room/room.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ angular.module('ramblApp.room', [])

.controller('roomController', ['$scope', '$window', '$location', 'EasyRTC', 'InterviewQuestions', 'Auth',
function ($scope, $window, $location, EasyRTC, InterviewQuestions, Auth) {
$scope.data = {};
$scope.data = {};
$scope.data.currentRoom = EasyRTC.getCurrentRoom();
$scope.data.userName = $window.localStorage.getItem('ramblUsername');
$scope.data.questions = InterviewQuestions.questions;
Expand All @@ -15,6 +15,6 @@ angular.module('ramblApp.room', [])
$scope.leaveRoom = EasyRTC.leaveRoom;

// set up elements for local and remote streams, set up room occupant listener
EasyRTC.interviewInit();
EasyRTC.interviewInit();
}]);

6 changes: 3 additions & 3 deletions client/app/services/easyrtc_services.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,9 @@ angular.module('ramblApp.easyRTCServices', [])
// connects to easyrtc if the flag is set to false
var connect = function (callback) {
var connectSuccess = function (selfId) {

// this callback gets the room list
connectionEstablished = true;

// this callback gets the room list
callback();
};
var connectFailure = function (err) {
Expand All @@ -154,7 +154,7 @@ angular.module('ramblApp.easyRTCServices', [])
// prevent connection attempt when going back to lobby from room
if (connectionEstablished === false) {

// User name gets set here for easy rtc
// User name gets set here for easyrtc
$window.easyrtc.setUsername($window.localStorage.getItem('ramblUsername'));
$window.easyrtc.connect('interview', connectSuccess, connectFailure);
}
Expand Down
4 changes: 3 additions & 1 deletion client/app/signup/signup.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ angular.module('ramblApp.signup', [])
$scope.signup = function () {
Auth.signup($scope.user)
.then(function (userObject) {
Auth.processLogin(userObject);
if (userObject.token !== undefined && userObject.userName !== undefined) {
Auth.processLogin(userObject);
}
})
.catch(function (error) {
console.error(error);
Expand Down
2 changes: 1 addition & 1 deletion client/built.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 787c115

Please sign in to comment.