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