Skip to content

Commit e3333c5

Browse files
#11 Cleaning code.
1 parent 21659a4 commit e3333c5

File tree

2 files changed

+2
-74
lines changed

2 files changed

+2
-74
lines changed

SMS-Back-End/apigms/apigms_api.py

-3
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,6 @@
2020

2121
app = Flask(__name__)
2222

23-
#app.config['CORS_HEADERS'] = 'Content-Type'
24-
#cors = CORS(app, resources={r"/foo": {"origins": "localhost"}})
25-
2623
# With this we get that the requests (in terminal) show the method DELETE instead of OPTIONS.
2724
CORS(app)
2825

SMS-Front-End/app/js/teaching/teachers/teachersProfile.js

+2-71
Original file line numberDiff line numberDiff line change
@@ -124,84 +124,15 @@ angular.module('teachers')
124124
};
125125

126126

127-
128-
129-
130-
131-
132-
133127
function saveTeacher() {
134128

135-
136-
console.log('Try to save')
137-
138-
/*
139-
console.log(vm.teacherId)
140-
TeachersService.update({id: vm.teacherId}, function(){
141-
console.log('Teacher changes saved successfully')
142-
console.log(vm.teacherClasses)
143-
}, function(error){
144-
console.log('Una mierda')
145-
console.log(error)
146-
})
147-
*/
148-
149-
/*
150-
vm.teacherSubjects = TeachersService.update({id: vm.teacherId}, function(){
151-
console.log('Teachers subjects')
152-
console.log(vm.teacherSubjects)
153-
})
154-
*/
155-
156-
157-
/*
158-
// El metodo funciona pero sin el id en la url
159-
console.log('vm.teacher.teacherId')
160-
console.log(vm.teacher.teacherId)
161-
162-
vm.teacher.$update(function(){
163-
console.log('success')
164-
}, function(error){
165-
console.log('error')
166-
console.log(error)
167-
});
168-
*/
169-
console.log(vm.teacher.teacherId)
170-
console.log(vm.teacher)
171-
// vm.teacher.data = {}
172-
// vm.teacher.data.teacherId = vm.teacherId
173-
//console.log(vm.teacher)
174-
//var teacher = {someProp:"Fiat", model:"500", color:"white"};
175-
176-
//TeachersService.update({ id:vm.teacherId}, teacher);
177-
178-
179129
vm.teacher.$update(function(){
180-
console.log('success')
130+
console.log('Success saving the teacher.')
181131
}, function(error){
182-
console.log('error')
132+
console.log('Error saving the teacher.')
183133
console.log(error)
184134
});
185135

186-
/*
187-
TeachersService.update({ id:vm.teacherId}, vm.teacher, function(){
188-
console.log('done')
189-
}, function(error){
190-
console.log('error')
191-
console.log(error)
192-
});
193-
*/
194-
195-
196-
197-
/*
198-
vm.teacher.$update(function () {
199-
console.log('Teacher changes saved successfully');
200-
$mdDialog.cancel();
201-
}, function(){
202-
console.log('There are any problem saving the teacher.')
203-
});
204-
*/
205136
}
206137

207138

0 commit comments

Comments
 (0)