twitter #2
@ -147,12 +147,11 @@ def get_twitter_campaign_details():
|
|||||||
if content_type != 'application/json':
|
if content_type != 'application/json':
|
||||||
return "Content-type not supported!", 400
|
return "Content-type not supported!", 400
|
||||||
|
|
||||||
request_json = request.json
|
if 'campaign_id' not in request.headers:
|
||||||
if 'campaign_id' not in request_json:
|
|
||||||
return "Invalid request!", 400
|
return "Invalid request!", 400
|
||||||
|
|
||||||
twitter_campaign = TwitterCampaign.query.filter_by(user_id=user_id, id=request_json['campaign_id']).first()
|
twitter_campaign = TwitterCampaign.query.filter_by(user_id=user_id, id=request.headers['campaign_id']).first()
|
||||||
campaign_posts = TwitterPost.query.filter_by(user_id=user_id, campaign_id=request_json['campaign_id']).all()
|
campaign_posts = TwitterPost.query.filter_by(user_id=user_id, campaign_id=request.headers['campaign_id']).all()
|
||||||
|
|
||||||
posts = []
|
posts = []
|
||||||
for post in campaign_posts:
|
for post in campaign_posts:
|
||||||
|
Loading…
Reference in New Issue
Block a user