def require(): result = [] data = request.json args = request.args if request.method == 'POST': if data: result = Require.add_to_db(data) if request.method == 'GET': result = Require.get_all() if request.method == 'PUT': if data: result = Require.update_by_id(data) if request.method == 'DELETE': if 'id' in args: result = Require.delete_by_id(args['id']) return wrap_response({"data": result}, False, 200)
def hello(): return wrap_response({"result": "Good"})