Example #1
0
def EditProfile():
    jsonData = request.get_json()
    print('Edit profile request')
    _db = db(cs)
    status = _db.edit_profile(jsonData)
    _db.shutdown()
    return good_response(status)
Example #2
0
def NewSkill():
    jsonData = request.get_json()
    print("New Skill Submission")
    _db = db(cs)
    resp = _db.new_skill(jsonData)
    _db.shutdown()
    return good_response(resp)
Example #3
0
def EditSkill():
    jsonData =request.get_json()
    print('Edit skill request')
    _db = db(cs)
    status = _db.edit_skill(jsonData)
    _db.shutdown()
    return good_response(status)
Example #4
0
def Login ():
    jsonData = request.get_json()
    print ( "Login Request" )
    _db = db(cs)
    resp = _db.attempt_login ( json=jsonData )
    _db.shutdown()
    return good_response(resp)
Example #5
0
def Register():
    jsonData = request.get_json()
    print("Register Request")
    _db = db(cs)
    resp = _db.attempt_register(jsonData)
    _db.shutdown()
    return good_response(resp)
Example #6
0
def GetProfile():
    jsonData = request.get_json()
    print("Getting Profile")
    _db = db(cs)
    resp = _db.attempt_get_profile(jsonData)
    _db.shutdown()
    return good_response(resp)
Example #7
0
def UpdateStatus():
    jsonData = request.get_json()

    print("Updating Skills Status'")
    _db = db(cs)
    resp = _db.update_statuses(jsonData)

    return good_response(resp)
Example #8
0
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)
Example #9
0
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)
Example #10
0
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)
Example #11
0
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)
Example #12
0
def GetUnfinishedSkills():
    print('Getting unfinished skills')
    _db = db(cs)
    resp = _db.get_unfinished_skills()

    return good_response(resp)
Example #13
0
    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...")