Commit d84ca0ac authored by HERBERT Ryan's avatar HERBERT Ryan Committed by Vidjil Team

base.js controllers/file.py patient.py remove methods

Removing unused info saving methods and routes
parent 254ad21b
......@@ -821,23 +821,6 @@ Database.prototype = {
return args
},
save_sample_info: function (sample_id, info) {
self.m.samples["info"][sample_id] = info;
var database_id = self.m.samples["ids"][sample_id];
this.request('file/save_info', {id: database_id, info: info});
},
save_patient_info: function (patient_id, info) {
self.m.info = info;
var database_id = patient_id;
this.request('patient/save_info', {id: database_id, info: info});
},
// Log functions, to server
// 'quiet' is set to true to avoid infinite loops with timeouts
log : function (lvl, msg) { this.request('default/logger', {'lvl': lvl, 'msg': msg}, true) },
......
......@@ -277,22 +277,3 @@ def producer_list():
res = {"producer": producer_list}
return gluon.contrib.simplejson.dumps(res, separators=(',',':'))
def save_info():
sequence_file_id = request.vars["id"]
row = db.sequence_file[sequence_file_id]
if row is not None:
if auth.can_modify_patient(row.patient_id):
db.sequence_file[sequence_file_id] = dict(info = request.vars["info"])
res = {"success": True,
"message": "The changes have been saved"}
else:
res = {"success": False,
"message": "You do not have permission to do that"}
else:
res = {"success": False,
"message": "An error occured"}
return gluon.contrib.simplejson.dumps(res, separators=(',', ':'))
......@@ -730,20 +730,3 @@ def change_permission():
res = {"message": ACCESS_DENIED}
log.error(res)
return gluon.contrib.simplejson.dumps(res, separators=(',',':'))
def save_info():
patient_id = request.vars["id"]
row = db.patient[patient_id]
if row is not None:
if auth.can_modify_patient(patient_id):
db.patient[patient_id] = dict(info = request.vars["info"])
res = {"success": True,
"message": "The changes have been saved"}
else:
res = {"success": False,
"message": "You do not have permission to do that"}
else:
res = {"success": False,
"message": "An error occured"}
return gluon.contrib.simplejson.dumps(res, separators=(',', ':'))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment