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