def api_my_merge(target): username = session['username'] sources = request.get_json(silent=True, force=True) data = flist_merge_data(sources, target) if data['error'] != None: return api_response(data['error'], 500) flist = HubPublicFlist(config, username, data['target']) status = flist.merge(data['sources']) if not status == True: return api_response(status, 500) return api_response()
def flist_merge(): username = session['username'] if request.method == 'POST': data = flist_merge_post() print(data) if data['error']: return internalRedirect("merge.html", data['error']) flist = HubPublicFlist(config, username, data['target']) status = flist.merge(data['sources']) if not status == True: variables = {'error': status} return globalTemplate("merge.html", variables) return uploadSuccess(data['target'], 0, data['target']) # Merge page return internalRedirect("merge.html")