Beispiel #1
0
def category_update():
    try:
        name = request.form['name']
        id = request.form['id']
    except KeyError:
        return error(400, u'参数错误')
    category = Category.update(**locals())
    if not category:
        return error(10022, 'update category failed')
    return category