def update(cid): form = CategoryContent().validate_for_api() Category.edit_model(cid, form.data, throw=True) return Success(msg='种类更新成功')