"""
@autor:Yue
@date::15:49
@file:callback_test.py
@project:autoInterface

"""
import os,json,time,sys
aa=os.path.abspath(__file__)
sys.path.append(os.path.dirname(os.path.dirname(aa)))
from flask import render_template,current_app,Blueprint,request,url_for,redirect,jsonify
try:
    from blueprints.exec import runexec
except:
    from blueprints.exec import runexec
from blueprints.tools.dealScene import dealScene
from blueprints.tools import deals

callback_test=Blueprint('callbackfunc',__name__)

@callback_test.route('/out-custom_link_batch',methods=['post'])
def hetongcallback():
    userId=request.json.get('userId')
    templateId = request.json.get('contract')[0].get('templateId')
    t={'userid':userId,'templateid':1,'msg':'return test flask out-custom_link_batch callback_test','code':'0'}
    return jsonify(t)


@callback_test.route('/out-custom_link',methods=['post'])
def hetongcallback1():
    userId=request.json.get('userId')
    templateId = request.json.get('contract')[0].get('templateId')
    t={'userid':userId,'templateid':1,'msg':'return test flask out-custom_link','code':'0'}
    return jsonify(t)