Commit b0bb0cd5 authored by Sarah Abrishami's avatar Sarah Abrishami

WIP

parent 776d9129
......@@ -8,6 +8,7 @@ import gc
from rulemall.utils.rule_builder import rule_builder
from app import db
from app.models import Validation
import yaml
def response_message(data=None, status=200):
......@@ -63,7 +64,8 @@ def read_data():
def read_rules():
return rule_builder('app/main/static/rule_config.yml')
path = 'app/main/static/rule_config.yml'
return rule_builder(yaml.load(open(path), Loader=yaml.FullLoader))
def write_validations(data):
......
from app.main import main
from app.main.utils.common import response_message
from flask import request
from rulemall import RuleSet
@main.route('/create', methods=['POST'])
def create():
req = request.get_json()
data = req['data']
rgs = req['rulesgroup']
rs = RuleSet(data)
return response_message()
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