request data
This commit is contained in:
@@ -108,18 +108,23 @@ def merms_register_complete():
|
|||||||
response = RegisterService.process_complete(data)
|
response = RegisterService.process_complete(data)
|
||||||
return response
|
return response
|
||||||
|
|
||||||
|
|
||||||
UPLOAD_FOLDER = '/uploads'
|
UPLOAD_FOLDER = '/uploads'
|
||||||
ALLOWED_EXTENSIONS = {'txt', 'pdf', 'png', 'jpg', 'jpeg', 'gif'}
|
ALLOWED_EXTENSIONS = {'txt', 'pdf', 'png', 'jpg', 'jpeg', 'gif'}
|
||||||
|
|
||||||
|
|
||||||
def allowed_file(filename):
|
def allowed_file(filename):
|
||||||
return '.' in filename and \
|
return '.' in filename and \
|
||||||
filename.rsplit('.', 1)[1].lower() in ALLOWED_EXTENSIONS
|
filename.rsplit('.', 1)[1].lower() in ALLOWED_EXTENSIONS
|
||||||
|
|
||||||
|
|
||||||
@api.route('/upload/webfiles', methods=['GET', 'POST'])
|
@api.route('/upload/webfiles', methods=['GET', 'POST'])
|
||||||
def upload_file():
|
def upload_file():
|
||||||
if request.method == 'POST':
|
if request.method == 'POST':
|
||||||
logger.info('POST CALLED')
|
logger.info('POST CALLED')
|
||||||
logger.info(f'POST CALLED {request}')
|
logger.info(f'POST CALLED {request}')
|
||||||
|
logger.info(f'POST CALLED {request.data}')
|
||||||
|
logger.info(f'POST CALLED {request.files}')
|
||||||
# check if the post request has the file part
|
# check if the post request has the file part
|
||||||
if 'file' not in request.files:
|
if 'file' not in request.files:
|
||||||
logger.info('No file part')
|
logger.info('No file part')
|
||||||
@@ -136,6 +141,7 @@ def upload_file():
|
|||||||
if request.method == 'GET':
|
if request.method == 'GET':
|
||||||
logger.info('GET CALLED')
|
logger.info('GET CALLED')
|
||||||
|
|
||||||
|
return []
|
||||||
|
|
||||||
|
|
||||||
@api.route("/panel/account", methods=["POST"])
|
@api.route("/panel/account", methods=["POST"])
|
||||||
@@ -153,6 +159,7 @@ def merms_account_profile():
|
|||||||
response = AccountService.process_profile_data(data)
|
response = AccountService.process_profile_data(data)
|
||||||
return response
|
return response
|
||||||
|
|
||||||
|
|
||||||
@api.route("/panel/account/profile-update", methods=["POST"])
|
@api.route("/panel/account/profile-update", methods=["POST"])
|
||||||
@jwt_required()
|
@jwt_required()
|
||||||
def merms_account_profile_update():
|
def merms_account_profile_update():
|
||||||
@@ -259,6 +266,7 @@ def get_myproduct_templates_activate():
|
|||||||
|
|
||||||
return response
|
return response
|
||||||
|
|
||||||
|
|
||||||
@api.route("/panel/account/colorstyle/activate", methods=["POST"])
|
@api.route("/panel/account/colorstyle/activate", methods=["POST"])
|
||||||
# @token_required
|
# @token_required
|
||||||
def get_myproduct_colorstyle_activate():
|
def get_myproduct_colorstyle_activate():
|
||||||
@@ -421,6 +429,7 @@ def test_check():
|
|||||||
# response = ProductsService.process_request(data)
|
# response = ProductsService.process_request(data)
|
||||||
return {"status": "ok"}, 200
|
return {"status": "ok"}, 200
|
||||||
|
|
||||||
|
|
||||||
# ======================================================
|
# ======================================================
|
||||||
@api.route('/website/contact', methods=['POST'])
|
@api.route('/website/contact', methods=['POST'])
|
||||||
def website_contact():
|
def website_contact():
|
||||||
|
|||||||
Reference in New Issue
Block a user