示例#1
0
def sendSinglePost():
    response = {}
    if request.method == 'POST':
        options = json.loads(request.data)
        filename = covid19.getImageFilename(options)
        options['url'] = store.addImageData(filename)
        store.addTextData(options)
    return jsonify(options)
示例#2
0
def receiveAllPosts():

    name = request.args.get('name')

    posts = store.searchTextData(name)

    return jsonify(posts)

    @app.route('/sendSinglePost', methods=['POST'])
    def sendSinglePost():

        response = {}

    if request.method == 'POST':

        options = json.loads(request.data)

        filename = covid19.getImageFilename(options)

        options['url'] = store.addImageData(filename)

        store.addTextData(options)

    return jsonify(options)