def link_get(): if not settings.local.sub_plan or \ 'enterprise' not in settings.local.sub_plan: return flask.abort(404) if settings.app.demo_mode: resp = utils.demo_get_cache() if resp: return utils.jsonify(resp) page = flask.request.args.get('page', None) page = int(page) if page else page links = [] for lnk in link.iter_links(page): links.append(lnk.dict()) data = { 'page': page, 'page_total': link.get_page_total(), 'links': links, } if settings.app.demo_mode: utils.demo_set_cache(data) return utils.jsonify(data)
def link_get(): page = flask.request.args.get('page', None) page = int(page) if page else page links = [] for lnk in link.iter_links(page): links.append(lnk.dict()) return utils.jsonify({ 'page': page, 'page_total': link.get_page_total(), 'links': links, })
def link_get(): if settings.local.sub_plan != 'enterprise_plus': return flask.abort(404) page = flask.request.args.get('page', None) page = int(page) if page else page links = [] for lnk in link.iter_links(page): links.append(lnk.dict()) return utils.jsonify({ 'page': page, 'page_total': link.get_page_total(), 'links': links, })