pbr-ayct-backend/ayct_backend/campaign/__init__.py

32 lines
949 B
Python
Raw Normal View History

2022-01-24 19:37:27 +01:00
import os
from flask import Blueprint, current_app, request, jsonify
campaign = Blueprint('campaign', __name__)
@campaign.route('/account', methods=['GET'])
def get_twitter_accounts():
content_type = request.headers.get('Content-Type')
if (content_type == 'application/json'):
json = request.json
return json
else:
return 'Content-Type not supported!'
@campaign.route('/account', methods=['POST'])
def add_twitter_account():
content_type = request.headers.get('Content-Type')
if (content_type == 'application/json'):
json = request.json
return json
else:
return 'Content-Type not supported!'
@campaign.route('/account', methods=['DELETE'])
def delete_twitter_account():
content_type = request.headers.get('Content-Type')
if (content_type == 'application/json'):
json = request.json
return json
else:
return 'Content-Type not supported!'