mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-08-05 16:58:59 +00:00
request.raw_post_data -> request.body (django 1.6)
This commit is contained in:
parent
57bc4c2569
commit
67ef0c578f
2 changed files with 3 additions and 3 deletions
|
@ -52,11 +52,11 @@ def push_callback(request, push_id):
|
||||||
# XXX TODO: Optimize this by removing feedparser. It just needs to find out
|
# XXX TODO: Optimize this by removing feedparser. It just needs to find out
|
||||||
# the hub_url or topic has changed. ElementTree could do it.
|
# the hub_url or topic has changed. ElementTree could do it.
|
||||||
if random.random() < 0.1:
|
if random.random() < 0.1:
|
||||||
parsed = feedparser.parse(request.raw_post_data)
|
parsed = feedparser.parse(request.body)
|
||||||
subscription.check_urls_against_pushed_data(parsed)
|
subscription.check_urls_against_pushed_data(parsed)
|
||||||
|
|
||||||
# Don't give fat ping, just fetch.
|
# Don't give fat ping, just fetch.
|
||||||
# subscription.feed.queue_pushed_feed_xml(request.raw_post_data)
|
# subscription.feed.queue_pushed_feed_xml(request.body)
|
||||||
if subscription.feed.active_premium_subscribers >= 1:
|
if subscription.feed.active_premium_subscribers >= 1:
|
||||||
subscription.feed.queue_pushed_feed_xml("Fetch me", latest_push_date_delta=latest_push_date_delta)
|
subscription.feed.queue_pushed_feed_xml("Fetch me", latest_push_date_delta=latest_push_date_delta)
|
||||||
MFetchHistory.add(feed_id=subscription.feed_id,
|
MFetchHistory.add(feed_id=subscription.feed_id,
|
||||||
|
|
2
vendor/zebra/views.py
vendored
2
vendor/zebra/views.py
vendored
|
@ -64,7 +64,7 @@ def webhooks_v2(request):
|
||||||
if request.method != "POST":
|
if request.method != "POST":
|
||||||
return HttpResponse("Invalid Request.", status=400)
|
return HttpResponse("Invalid Request.", status=400)
|
||||||
|
|
||||||
event_json = json.loads(request.raw_post_data)
|
event_json = json.loads(request.body)
|
||||||
event_key = event_json['type'].replace('.', '_')
|
event_key = event_json['type'].replace('.', '_')
|
||||||
|
|
||||||
if event_key in WEBHOOK_MAP:
|
if event_key in WEBHOOK_MAP:
|
||||||
|
|
Loading…
Add table
Reference in a new issue