|
|
@@ -3,7 +3,6 @@ app.controller('uploadCtrl', function ($scope, $http,video,notify) {
|
|
|
$scope.texto1="";
|
|
|
$scope.texto2="";
|
|
|
$scope.video = video;
|
|
|
- $scope.diapos = [];
|
|
|
$scope.profesores = [];
|
|
|
|
|
|
function getProf(){
|
|
|
@@ -18,18 +17,17 @@ app.controller('uploadCtrl', function ($scope, $http,video,notify) {
|
|
|
getProf();
|
|
|
|
|
|
$scope.post = function() {
|
|
|
- var data = {
|
|
|
+ var postdata = {
|
|
|
prof: $scope.profesor,
|
|
|
texto1: $scope.texto1,
|
|
|
texto2: $scope.texto2,
|
|
|
id: $scope.video._id,
|
|
|
- diapos: diapos
|
|
|
- };
|
|
|
- $http.post('/back/upload/', data)
|
|
|
- .success(function(data,state) {
|
|
|
+ diapos: []
|
|
|
+ };
|
|
|
+
|
|
|
+ $http.post('/back/upload/', postdata).success(function(data,state) {
|
|
|
notify({message:data.status,classes:"alert"});
|
|
|
- })
|
|
|
- .error(function(data) {
|
|
|
+ }).error(function(data) {
|
|
|
notify({message:data.status,classes:"alert alert-danger"});
|
|
|
});
|
|
|
};
|