Exemplo n.º 1
0
def add_pro(ques):


    with db.auto_commit():
        pro = Problem()
        pro.ques = ques
        db.session.add(pro)


    return Success()
def appendOneProblem():
    userId = g.userInfo.userId
    form = ProblemForm().validateForApi()
    pid = Problem().appendOneProblem(ownerId=userId, form=form)
    return Success(information="新建问题成功", payload={"problemId": pid})