예제 #1
0
def officer_updateCaseStatements():
    res = dataSource(request)
    params = inspect.getargspec(officer.updateCaseStatements).args
    
    # check params should be in res
    if (not validateResponse(params, res)):
        return jsonify({'res': 'failed', 'type':'missing params %s' %returnMissingParams(params, res)})
    
    if(not addtionalParams(params, res)):
        return jsonify({'res':'failed', 'reason': 'Additional Param Supplied.'})
    
    return convertToJson(officer.updateCaseStatements(**res))
예제 #2
0
파일: firms.py 프로젝트: deepigarg/honour
def firm_earningByLawyers():
    res = dataSource(request)
    params = inspect.getargspec(firm.earningByLawyers).args
    
    # check params should be in res
    if (not validateResponse(params, res)):
        return jsonify({'res': 'failed', 'type':'missing params %s' %returnMissingParams(params, res)})
    
    if(not addtionalParams(params, res)):
        return jsonify({'res':'failed', 'reason': 'Additional Param Supplied.'})
    
    return convertToJson(firm.earningByLawyers(**res))
예제 #3
0
def lawyer_todaySchedule():
    res = dataSource(request)
    params = inspect.getargspec(lawyer.todaySchedule).args

    # check params should be in res
    if (not validateResponse(params, res)):
        return jsonify({'res': 'failed', 'type':'missing params %s' %returnMissingParams(params, res)})
    
    if(not addtionalParams(params, res)):
        return jsonify({'res':'failed', 'reason': 'Additional Param Supplied.'})
    
    return convertToJson(lawyer.todaySchedule(**res))
예제 #4
0
파일: student.py 프로젝트: deepigarg/honour
def student_getCasesByKeywords():
    res = dataSource(request)
    params = inspect.getargspec(student.getCasesByKeywords).args

    # check params should be in res
    if (not validateResponse(params, res)):
        return jsonify({
            'res':
            'failed',
            'type':
            'missing params %s' % returnMissingParams(params, res)
        })

    if (not addtionalParams(params, res)):
        return jsonify({
            'res': 'failed',
            'reason': 'Additional Param Supplied.'
        })

    return convertToJson(student.getCasesByKeywords(**res))
예제 #5
0
파일: clients.py 프로젝트: deepigarg/honour
def client_makePayment():
    res = dataSource(request)
    params = inspect.getargspec(client.makePayment).args

    # check params should be in res
    if (not validateResponse(params, res)):
        return jsonify({
            'res':
            'failed',
            'type':
            'missing params %s' % returnMissingParams(params, res)
        })

    if (not addtionalParams(params, res)):
        return jsonify({
            'res': 'failed',
            'reason': 'Additional Param Supplied.'
        })

    return convertToJson(client.makePayment(**res))
예제 #6
0
파일: judges.py 프로젝트: deepigarg/honour
def judge_lawyerTrackRecord():
    res = dataSource(request)
    params = inspect.getargspec(judge.lawyerTrackRecord).args

    # check params should be in res
    if (not validateResponse(params, res)):
        return jsonify({
            'res':
            'failed',
            'type':
            'missing params %s' % returnMissingParams(params, res)
        })

    if (not addtionalParams(params, res)):
        return jsonify({
            'res': 'failed',
            'reason': 'Additional Param Supplied.'
        })

    return convertToJson(judge.lawyerTrackRecord(**res))
예제 #7
0
파일: judges.py 프로젝트: deepigarg/honour
def judge_viewPenAccusedStmnts():
    res = dataSource(request)
    params = inspect.getargspec(judge.viewPendingCases).args

    # check params should be in res
    if (not validateResponse(params, res)):
        return jsonify({
            'res':
            'failed',
            'type':
            'missing params %s' % returnMissingParams(params, res)
        })

    if (not addtionalParams(params, res)):
        return jsonify({
            'res': 'failed',
            'reason': 'Additional Param Supplied.'
        })

    return convertToJson(judge.viewPendingCases(**res))
예제 #8
0
파일: judges.py 프로젝트: deepigarg/honour
def judge_bonus():
    res = dataSource(request)
    params = ['keywords']

    # check params should be in res
    if (not validateResponse(params, res)):
        return jsonify({
            'res':
            'failed',
            'type':
            'missing params %s' % returnMissingParams(params, res)
        })

    if (not addtionalParams(params, res)):
        return jsonify({
            'res': 'failed',
            'reason': 'Additional Param Supplied.'
        })

    keywords = res['keywords']
    keywords = keywords.split(',')
    res = getIPC(keywords)

    return convertToJson({'res': 'success', 'arr': res})