def get_banner(id): '''获取「首页轮播图」''' id = IDMustBePositiveInt().validate_for_api().id.data banner = Banner.get_banner_by_id(id=id) # banner.hide('description') # 临时隐藏 return Success(banner)
def get_one(id): '''获取「首页轮播图」''' banner = Banner.get_banner_by_id(id=id) # banner.hide('description') # 可以隐藏某个字段 return Success(banner)
def get_banner(id): banner = Banner.get_banner_by_id(id=id) return jsonify(banner)
def get_banner(id): id = IDMustBePositiveInt().validate_for_api().id.data banner = Banner.get_banner_by_id(id=id) # banner.hide('description') # 临时隐藏 return Success(banner)