-messages (in progress)
This commit is contained in:
parent
414d3b7215
commit
4fc5c9ba73
1 changed files with 1 additions and 5 deletions
|
@ -47,8 +47,6 @@ angular.module('SeHub')
|
|||
console.log($scope.courseObj);
|
||||
if($scope.msg.msgToAdd != null && $scope.courseObj.courseName)
|
||||
{
|
||||
console.log("NOW");
|
||||
|
||||
jsonNewMsg = {
|
||||
'groupId': $scope.courseObj.id, // TODO Should be ===> $scope.courseObj.id
|
||||
'message': $scope.msg.msgToAdd
|
||||
|
@ -56,13 +54,11 @@ angular.module('SeHub')
|
|||
|
||||
apiService.createMessage(token, jsonNewMsg).success(function(data)
|
||||
{
|
||||
$scope.userMessages.push(data);
|
||||
}).error(function(err)
|
||||
{
|
||||
console.log(err.message);
|
||||
});
|
||||
|
||||
$scope.userMessages.push({"text": $scope.msg.msgToAdd});
|
||||
$location.path('/home/');
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue