def EditProfile(): jsonData = request.get_json() print('Edit profile request') _db = db(cs) status = _db.edit_profile(jsonData) _db.shutdown() return good_response(status)
def NewSkill(): jsonData = request.get_json() print("New Skill Submission") _db = db(cs) resp = _db.new_skill(jsonData) _db.shutdown() return good_response(resp)
def EditSkill(): jsonData =request.get_json() print('Edit skill request') _db = db(cs) status = _db.edit_skill(jsonData) _db.shutdown() return good_response(status)
def Login (): jsonData = request.get_json() print ( "Login Request" ) _db = db(cs) resp = _db.attempt_login ( json=jsonData ) _db.shutdown() return good_response(resp)
def Register(): jsonData = request.get_json() print("Register Request") _db = db(cs) resp = _db.attempt_register(jsonData) _db.shutdown() return good_response(resp)
def GetProfile(): jsonData = request.get_json() print("Getting Profile") _db = db(cs) resp = _db.attempt_get_profile(jsonData) _db.shutdown() return good_response(resp)
def UpdateStatus(): jsonData = request.get_json() print("Updating Skills Status'") _db = db(cs) resp = _db.update_statuses(jsonData) return good_response(resp)
def DeleteSkill(): jsonData = request.get_json() id = jsonData['SkillId'] print("Deleting Skill") _db = db(cs) resp = _db.delete_skill(id, jsonData['amznSkillId']) return jsonify(resp)
def GetSkill(): json = request.get_json() SkillId = json['SkillId'] print("Retrieving skill") _db = db(cs) resp = _db.get_skill(SkillId=SkillId) _db.shutdown() print("returning get skill response") return good_response(resp)
def ViewSkills(): json = request.get_json() UserId = json['UserId'] print("Requesting Skills for User") _db = db(cs) resp = _db.attempt_get_skills(UserId=UserId,limit=None) _db.shutdown() print("returning view skill response") return good_response(resp)
def SubmitSkill(): jsonData = request.get_json() print('Skill Submission Request') _db = db(cs) resp = _db.submit_skill(jsonData) _db.shutdown() # Post skill to be submitteds data to Service1 MetaVoiceLambda # change config to 'aws' when testing on aws ec2 return jsonify(resp)
def GetUnfinishedSkills(): print('Getting unfinished skills') _db = db(cs) resp = _db.get_unfinished_skills() return good_response(resp)
return jsonify(resp) @app.route('/updatestatus', methods=['POST']) def UpdateStatus(): jsonData = request.get_json() print("Updating Skills Status'") _db = db(cs) resp = _db.update_statuses(jsonData) return good_response(resp) @app.route('/complexstatusupdate',methods=['POST']) def ComplexStatusUpdate() jsonData = request.get_json() print("Updating status' on amznSkillId") _db = db(cs) resp = _db.complex_status_update(jsonData) return good_response(resp) @app.route('/getunfinishedskills', methods=['POST']) def GetUnfinishedSkills(): print('Getting unfinished skills') _db = db(cs) resp = _db.get_unfinished_skills() return good_response(resp) <<<<<<< HEAD ======= def check(): print("running job...")